Closed Munter closed 9 years ago
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: for (var idx1 = 0; idx1 < a.length; idx1++) (the code you pasted missed the initialization of the index).
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
And now with the hasOwnProperty
check removed :)
Thanks for the contribution! I will publish a new version in npm during the weekend.
Thanks :+1:
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.prototype
has been amended with helper functions, the palette will some times return color objects withNaN
in 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.