Skip to content

Commit 0a21710

Browse files
committed
address issue 5289 - use if block instead of loop
1 parent 52b5051 commit 0a21710

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/traces/histogram/cross_trace_defaults.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,9 @@ module.exports = function crossTraceDefaults(fullData, fullLayout) {
174174
}
175175

176176
var binGroupFound = false;
177-
for(i = 0; i < traces.length; i++) {
178-
traceOut = traces[i];
177+
if(traces.length) {
178+
traceOut = traces[0];
179179
binGroupFound = coerce('bingroup');
180-
break;
181180
}
182181

183182
groupName = binGroupFound || groupName;

0 commit comments

Comments
 (0)