You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If sorted is an empty array line 196 will always return 0, indicating that both items were equal, which may not be the case. And is actually not the case in Chrome, because Array#sort does not iterate over items in order. For arrays larger than a certain size (10?) it appears to use a half-interval algorithm, so data that was originally in a certain order will be changed to a different order with dstore's current logic.
The text was updated successfully, but these errors were encountered:
msssk
changed the title
SimpleQuery._createSortQuerier sort comparator function is incorrect
SimpleQuery._createSortQuerier sort comparator function is incorrect
Sep 17, 2015
https://github.com/SitePen/dstore/blob/v1.1.0/SimpleQuery.js#L172
If
sorted
is an empty array line 196 will always return 0, indicating that both items were equal, which may not be the case. And is actually not the case in Chrome, becauseArray#sort
does not iterate over items in order. For arrays larger than a certain size (10?) it appears to use a half-interval algorithm, so data that was originally in a certain order will be changed to a different order with dstore's current logic.The text was updated successfully, but these errors were encountered: