75 function changeOverflow(value) {
76 {
77 var width = ta.style.width;
78 ta.style.width = "0px"; 79 ta.style.width = width;
80 }
81 ta.style.overflowY = value;
102 return;
103 }
104 var restoreOverflows = bookmarkOverflows(ta);
105 ta.style.height = "";106 ta.style.height = ta.scrollHeight + heightOffset + "px";
107 clientWidth = ta.clientWidth;
108 restoreOverflows();
495 }
496 if (url && !/^wss?:/i.test(url)) {
497 const a2 = document.createElement("a");
498 a2.href = url; 499 a2.href = a2.href;
500 a2.protocol = a2.protocol.replace("http", "ws");
501 return a2.href;
Consecutively reassigning to the same variable or property is a code smell and should be avoided. It is likely that this is the result of some undeleted code and can have unexpected side effects. The first assignment is rendered useless by the second and can therefore be removed without observing any changes to the value of the assignment target.
a[1] = 'something'
a[1] = 'some other thing'
a[1] = 'something'
if (condition()) {
a[1] = 'some other thing'
}