Skip to content

Commit 5f26169

Browse files
committed
Use Object.keys instead of for-in
1 parent b8864eb commit 5f26169

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plots/geo/geo.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ proto.onceTopojsonIsLoaded = function(geoData, geoLayout) {
146146
traceData[trace.type].push(trace);
147147
}
148148

149-
for(var traceType in traceData){
150-
Plots.getModule(traceType).plot(this, traceData[traceType], geoLayout);
149+
var traceKeys = Object.keys(traceData);
150+
for(var j = 0; j < traceKeys.length; j++){
151+
var traceKey = traceKeys[j];
152+
Plots.getModule(traceKey).plot(this, traceData[traceKey], geoLayout);
151153
}
152154

153155
this.render();

0 commit comments

Comments
 (0)