diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 2708ebe7e..c4ea2b358 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -645,7 +645,6 @@ class Runtime extends EventEmitter { * inactive threads after each iteration. */ _step () { - this._refreshTargets = false; // Find all edge-activated hats, and add them to threads to be evaluated. for (const hatType in this._hats) { if (!this._hats.hasOwnProperty(hatType)) continue; @@ -663,7 +662,10 @@ class Runtime extends EventEmitter { // @todo: Only render when this.redrawRequested or clones rendered. this.renderer.draw(); } - if (this._refreshTargets) this.emit(Runtime.TARGETS_UPDATE); + if (this._refreshTargets) { + this.emit(Runtime.TARGETS_UPDATE); + this._refreshTargets = false; + } } /**