Skip to content

Commit

Permalink
feat: fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping committed Feb 20, 2023
1 parent 888a3ea commit 969a3c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lowcode/common/keybindingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class KeybindingService {
targetKb.cb.apply(null, [node, ...rest]);
}
private getSelectedNode() {
const selectedNodeId = this.project.currentDocument?.selection.selected[0];
return selectedNodeId ? this.project.currentDocument?.nodesMap.get(selectedNodeId) : null;
return this.project.currentDocument?.selection.getNodes()[0];
}
private isValidNode(node: any, kb: IKeyBinding) {
return kb.components === '*' || kb.components.includes(node.componentName);
Expand Down

0 comments on commit 969a3c5

Please sign in to comment.