Skip to content

Commit

Permalink
fix(dcellar-web-ui): deduplication issue with repeatedly adding files
Browse files Browse the repository at this point in the history
  • Loading branch information
devinxl committed Apr 8, 2024
1 parent 56e9ae1 commit 2e30933
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/dcellar-web-ui/src/hooks/useHandleFolderTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ export const useHandleFolderTree = () => {
return waitObject;
});

const list = Object.values(
keyBy([...objectWaitQueue, ...newWaitQueue], (item) => item.id + '_' + item.name),
const finalWaitQueue = Object.values(
keyBy([...objectWaitQueue, ...newWaitQueue], (item) => item.relativePath + '/' + item.name),
);
dispatch(setWaitQueue(list));

dispatch(setWaitQueue(finalWaitQueue));
};

return {
Expand Down

0 comments on commit 2e30933

Please sign in to comment.