Skip to content

Commit

Permalink
fix: do not order original array on hash
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed Nov 23, 2021
1 parent 459adc5 commit c5370f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const getDirectParentId = (path: string) => {
export const hashItemsIds = (ids?: UUID[]) =>
ids
? crypto
.createHash('sha1')
.update(ids.sort().join(''))
.digest('hex')
.toString()
.createHash('sha1')
.update([...ids].sort().join(''))
.digest('hex')
.toString()
: undefined;

0 comments on commit c5370f1

Please sign in to comment.