Skip to content

Commit

Permalink
Use ordered execution instead of instant update
Browse files Browse the repository at this point in the history
  • Loading branch information
StefansArya committed Feb 9, 2023
1 parent 32d1289 commit ce92176
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/constructor/Cable.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ class Cable{
let defaultVal = inputPort.default;
if(defaultVal != null && defaultVal !== oldVal){
let iface = inputPort.iface;
let node = iface.node;
let routes = node.routes; // PortGhost's node may not have routes

if(iface._bpDestroy !== true && iface.node.routes.in.length === 0){
if(iface._bpDestroy !== true && routes != null && routes.in.length === 0){
let temp = { port: inputPort, target: this.output, cable: this };
inputPort.emit('value', temp);
iface.emit('port.value', temp);
iface.node._bpUpdate();
node.instance.executionOrder.add(node);
}
}

Expand Down

0 comments on commit ce92176

Please sign in to comment.