-
Notifications
You must be signed in to change notification settings - Fork 30
Guard against external libraries modifying Array.prototype #7
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
Conversation
|
Hi Munter! Thanks for contributing to color-diff! I'd prefer the solution using the modified loop, it should work if you change the loop to: |
1 similar comment
6aec030 to
e0a7c2e
Compare
|
Right, I guess I was a bit tired when I tried that version. I've switched to a traditional for-loop now and the tests are passing. I've also verified that this version doesn't experience the original problem I encountered |
1 similar comment
e0a7c2e to
467627e
Compare
|
And now with the |
Guard against external libraries modifying Array.prototype
|
Thanks for the contribution! I will publish a new version in npm during the weekend. |
|
Thanks 👍 |
|
Tagged as 0.1.7 and published in npm. |
|
Ping @sunesimonsen |
|
Great, thanks for the quick merge. |
When running color-diff in an environment where
Array.prototypehas been amended with helper functions, the palette will some times return color objects withNaNin every dimension.I tried using a
for(var idx1; idx1 < a.length; idx1 += 1)loop, which would be cleaner, but when I do the tests are failing.