FiratUsta / Chromora

A lightweight and fast color palette generator built using pure HTML, CSS & JS .
GNU General Public License v3.0
5 stars 3 forks source link

fix chrome sorting bug #22

Closed nfortuna73 closed 3 months ago

nfortuna73 commented 3 months ago

Webkit also seems to work for me. #21 Javascript array.sort takes in a sort function that should return a number - negative for <, 0 for ==, positive for >. The original code returns a bool, which translates to 0 or 1, ie only == or >, never <.

https://stackoverflow.com/a/48082262 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort

FiratUsta commented 3 months ago

Thank you for the fix, hugely appreciated!

Merging & pushing to live.