From cfad9ca5f93e86cd21f9197858d335d29fe2be52 Mon Sep 17 00:00:00 2001 From: StefansArya Date: Sun, 12 Feb 2023 15:06:38 +0700 Subject: [PATCH] Fix incorrect reference that cause error when removing environment node --- src/nodes/Env.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nodes/Env.js b/src/nodes/Env.js index 4d9e062..125a8c0 100644 --- a/src/nodes/Env.js +++ b/src/nodes/Env.js @@ -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}; @@ -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() } }, }; @@ -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);