diff --git a/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts b/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts index 3bef79b7..129302a2 100644 --- a/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts +++ b/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts @@ -115,10 +115,9 @@ export const useCmdk = ({ }, [clipboardData, selectedItems, fileTree[currentFileUid], nodeTree]); const onDuplicate = useCallback(() => { - if (clipboardData?.panel !== "file") return; onCopy(); onPaste(); - }, []); + }, [selectedItems, fileTree[currentFileUid], nodeTree, clipboardData]); const onDelete = useCallback(() => { const params: TFileApiPayload = {