Skip to content

Commit

Permalink
fix: 修复页面为空时,右键触发报错
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeeeeeM committed Oct 29, 2024
1 parent f6305c2 commit 742e4a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/designer/src/context-menu-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ export class ContextMenuActions implements IContextMenuActions {
node: INode;
originalEvent: MouseEvent;
}) => {
// 页面为空时,右键会读取 node.id报错
if (!node) return;
originalEvent.stopPropagation();
originalEvent.preventDefault();
// 如果右键的节点不在 当前选中的节点中,选中该节点
Expand Down

0 comments on commit 742e4a8

Please sign in to comment.