From 8f817486f293eb181aa94a0b65033e59ad22957e Mon Sep 17 00:00:00 2001 From: pyphilia Date: Tue, 23 Nov 2021 16:43:03 +0100 Subject: [PATCH] fix: do not order original array on hash --- src/utils/item.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/item.ts b/src/utils/item.ts index 27d1c1145..3aeb09fb7 100644 --- a/src/utils/item.ts +++ b/src/utils/item.ts @@ -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;