fix connection aborted issue

This commit is contained in:
Mutasem 2021-11-05 12:31:26 +01:00
parent 0f07c88476
commit 5cb00963e7

View file

@ -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;