Skip to content

Commit

Permalink
Fix incorrect reference that cause error when removing environment node
Browse files Browse the repository at this point in the history
  • Loading branch information
StefansArya committed Feb 12, 2023
1 parent 010d001 commit cfad9ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nodes/Env.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Blackprint.nodes.BP.Env = {

iface._enum = _InternalNodeEnum.BPEnvGet;
}
destroy(){ this.node.destroyListener() }
destroy(){ this.iface.destroyListener() }
},
Set: class extends Blackprint.Node {
static input = {Val: String};
Expand All @@ -33,7 +33,7 @@ Blackprint.nodes.BP.Env = {
update(){
Blackprint.Environment.set(this.iface.data.name, this.input.Val);
}
destroy(){ this.node.destroyListener() }
destroy(){ this.iface.destroyListener() }
},
};

Expand Down Expand Up @@ -107,7 +107,7 @@ function BPEnvInit(){
this.ref.Output.Val = Blackprint.Environment.map[this.data.name];
}
destroyListener(){
this.destroyListener();
super.destroyListener();

if(this._listener == null) return;
Blackprint.off('environment.changed environment.added', this._listener);
Expand Down

0 comments on commit cfad9ca

Please # to comment.