Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 07202a4

Browse files
committed
In a great demonstration of why we need regression tests, and why you should use hasOwnProperty in a loop, my polyfill for includes seriously broke codelens.
1 parent 243099d commit 07202a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runestone/codelens/js/codelens.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ function attachLoggers(codelens, divid) {
3131
}
3232

3333
function redrawAllVisualizerArrows() {
34+
var i;
3435
if (allVisualizers !== undefined) {
35-
for (var v in allVisualizers)
36-
allVisualizers[v].redrawConnectors();
36+
for (i = 0; i < allVisualizers.length; i++) {
37+
allVisualizers[i].redrawConnectors();
38+
}
3739
}
3840
}
3941
function styleButtons(divid) {

0 commit comments

Comments
 (0)