d3/d3-array

d3.bin can mutate the user-specified thresholds

mbostock opened this issue · 0 comments

We sometimes should make a copy of tz before mutating here:

d3-array/src/bin.js

Lines 68 to 71 in 147e2bf

// Remove any thresholds outside the domain.
var m = tz.length;
while (tz[0] <= x0) tz.shift(), --m;
while (tz[m - 1] > x1) tz.pop(), --m;