Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3.bin can mutate the user-specified thresholds #263

Closed
mbostock opened this issue Dec 3, 2022 · 0 comments
Closed

d3.bin can mutate the user-specified thresholds #263

mbostock opened this issue Dec 3, 2022 · 0 comments
Labels
bug Something isn’t working

Comments

@mbostock
Copy link
Member

mbostock commented Dec 3, 2022

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Development

No branches or pull requests

1 participant