Skip to content

Commit eef9158

Browse files
committed
add 1e6 upper bound to pos array length
1 parent b824d8e commit eef9158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/histogram/calc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module.exports = function calc(gd, trace) {
106106
// decrease end a little in case of rounding errors
107107
binend = pr2c(binspec.end) + (i - Axes.tickIncrement(i, binspec.size, false, calendar)) / 1e6;
108108

109-
while(i < binend) {
109+
while(i < binend && pos.length < 1e6) {
110110
i2 = Axes.tickIncrement(i, binspec.size, false, calendar);
111111
pos.push((i + i2) / 2);
112112
size.push(sizeinit);

0 commit comments

Comments
 (0)