From 5cb00963e72cdc8705dd7c44607c3fb71fcaf025 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Fri, 5 Nov 2021 12:31:26 +0100 Subject: [PATCH] fix connection aborted issue --- packages/editor-ui/src/views/NodeView.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index c7963f8cfb..bdc2bc6961 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -1198,9 +1198,11 @@ export default mixins( getConnection (sourceNodeName: string, sourceNodeOutputIndex: number, targetNodeName: string, targetNodeOuputIndex: number): IConnection | undefined { const nodeConnections = (this.$store.getters.outgoingConnectionsByNodeName(sourceNodeName) as INodeConnections).main; if (nodeConnections) { - const connections: IConnection[] = nodeConnections[sourceNodeOutputIndex]; + const connections: IConnection[] | null = nodeConnections[sourceNodeOutputIndex]; - return connections.find((connection: IConnection) => connection.node === targetNodeName && connection.index === targetNodeOuputIndex); + if (connections) { + return connections.find((connection: IConnection) => connection.node === targetNodeName && connection.index === targetNodeOuputIndex); + } } return undefined;