We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Collection.sortBy
IndexedDB.cmp
Collection.sortBy function uses < or > for comparing values for the sort.
<
>
Dexie.js/src/classes/collection/collection.ts
Line 153 in e41f017
It causes unexpected behaviour for Typed arrays such as Uint8Array. For example, it sorts the values in lexicographical order like this.
new Uint8Array([1,46]) > new Uint8Array([1,146]) > true
This is inconsistent to the treatment of the Typed arrays in the IndexedDB. We have to use the IndexedDB.cmp for comparing function.
The text was updated successfully, but these errors were encountered:
cmp
Successfully merging a pull request may close this issue.
Collection.sortBy
function uses<
or>
for comparing values for the sort.Dexie.js/src/classes/collection/collection.ts
Line 153 in e41f017
It causes unexpected behaviour for Typed arrays such as Uint8Array.
For example, it sorts the values in lexicographical order like this.
This is inconsistent to the treatment of the Typed arrays in the IndexedDB.
We have to use the
IndexedDB.cmp
for comparing function.The text was updated successfully, but these errors were encountered: