for..in -> normal for loop
authorMarek Janda <nyx@nyx.cz>
Tue, 23 Jun 2015 18:04:11 +0000 (20:04 +0200)
committerMarek Janda <nyx@nyx.cz>
Tue, 23 Jun 2015 18:04:11 +0000 (20:04 +0200)
src/extras/synchronizer.js

index bd75050..16c042e 100644 (file)
@@ -107,7 +107,7 @@ Dygraph.synchronize = function(/* dygraphs..., opts */) {
           if (!prevCallbacks[j]) {
             prevCallbacks[j] = {};
           }
-          for (var k in callBackTypes) {
+          for (var k = callBackTypes.length - 1; k >= 0; k--) {
             prevCallbacks[j][callBackTypes[k]] = dygraphs[j].getFunctionOption(callBackTypes[k]);
           }
         }