@@ -53,7 +53,7 @@ class NRFlowSet {
5353 // config.{id,type} are removed in NRNode constructor
5454 const node = new NRNode ( config )
5555 this . nodes . set ( node . id , node ) ;
56- if ( node . type === "link in" || node . type === "link out" ) {
56+ if ( node . type === "link call" || node . type === "link in" || node . type === "link out" ) {
5757 linkNodes . push ( node ) ;
5858 }
5959 }
@@ -88,12 +88,14 @@ class NRFlowSet {
8888 if ( ! createdLinks . has ( linkIdentifier ) ) {
8989 createdLinks . add ( linkIdentifier ) ;
9090 let remoteNode = this . nodes . get ( remoteId ) ;
91- let sourceNode = linkNode . type === "link in" ?remoteNode :linkNode ;
92- let destinationNode = linkNode . type === "link in" ?linkNode :remoteNode ;
93- let wire = new NRWire ( sourceNode , 0 , destinationNode , 0 , true ) ;
94- sourceNode . addOutboundWire ( wire ) ;
95- destinationNode . addInboundWire ( wire ) ;
96- this . wires . push ( wire ) ;
91+ if ( remoteNode ) {
92+ let sourceNode = linkNode . type === "link in" ?remoteNode :linkNode ;
93+ let destinationNode = linkNode . type === "link in" ?linkNode :remoteNode ;
94+ let wire = new NRWire ( sourceNode , 0 , destinationNode , 0 , true ) ;
95+ sourceNode . addOutboundWire ( wire ) ;
96+ destinationNode . addInboundWire ( wire ) ;
97+ this . wires . push ( wire ) ;
98+ }
9799 }
98100 } )
99101 } )
0 commit comments