diff --git a/src/engine/runtime.js b/src/engine/runtime.js index d97247e58..71205beb8 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -188,8 +188,10 @@ Runtime.prototype.toggleStack = function (stackId) { for (var i = 0; i < this.threads.length; i++) { if (this.threads[i].topBlock == stackId) { this._removeThread(this.threads[i]); + return; } } + // Otherwise add it this._pushThread(stackId); };