Skip to content

Commit

Permalink
fix(editor): Fix console error (#3751)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutdmour committed Jul 21, 2022
1 parent 5efe4a4 commit 3a98028
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/editor-ui/src/components/InputPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default mixins(
},
showDraggableHint(): boolean {
const toIgnore = [START_NODE_TYPE, CRON_NODE_TYPE, INTERVAL_NODE_TYPE];
if (toIgnore.includes(this.currentNode.type)) {
if (!this.currentNode || toIgnore.includes(this.currentNode.type)) {
return false;
}
Expand Down Expand Up @@ -145,7 +145,7 @@ export default mixins(
activeNode (): INodeUi | null {
return this.$store.getters.activeNode;
},
currentNode (): INodeUi {
currentNode (): INodeUi | null {
return this.$store.getters.getNodeByName(this.currentNodeName);
},
connectedCurrentNodeOutputs(): number[] | undefined {
Expand All @@ -164,7 +164,7 @@ export default mixins(
return nodes.filter(({name}, i) => (this.activeNode && (name !== this.activeNode.name)) && nodes.findIndex((node) => node.name === name) === i);
},
currentNodeDepth (): number {
const node = this.parentNodes.find((node) => node.name === this.currentNode.name);
const node = this.parentNodes.find((node) => this.currentNode && node.name === this.currentNode.name);
return node ? node.depth: -1;
},
},
Expand Down

0 comments on commit 3a98028

Please sign in to comment.