Skip to content

Commit 2089f86

Browse files
committed
fix: copy callback
1 parent 5dcecf0 commit 2089f86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/actions/clipboard.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ export class Clipboard {
238238
return 'disabled';
239239
},
240240
callback: (scope, menuOpenEvent) => {
241-
const ws = scope.block?.workspace;
242-
if (!ws) return;
241+
if (!isCopyable(scope.focusedNode)) return false;
242+
const ws = scope.focusedNode.workspace;
243+
if (!(ws instanceof WorkspaceSvg)) return false;
244+
243245
return this.copyCallback(ws, menuOpenEvent, undefined, scope);
244246
},
245247
id: 'blockCopyFromContextMenu',

0 commit comments

Comments
 (0)