Also run monitor blocks every frame
This commit is contained in:
1 parent
2aef75bc11
commit
cc1678fa9e
1 file changed
+2
-2
@@ -478,7 +478,8 @@ class Runtime extends EventEmitter {
|
||||
}, opts);
|
||||
// Remove any existing thread.
|
||||
for (let i = 0; i < this.threads.length; i++) {
|
||||
if (this.threads[i].topBlock === topBlockId) {
|
||||
// Toggling a script that's already running turns it off
|
||||
if (this.threads[i].topBlock === topBlockId && this.threads[i].status !== Thread.STATUS_DONE) {
|
||||
const blockContainer = opts.target.blocks;
|
||||
const opcode = blockContainer.getOpcode(blockContainer.getBlock(topBlockId));
|
||||
|
||||
@@ -487,7 +488,6 @@ class Runtime extends EventEmitter {
|
||||
// edge activated hat thread that runs every frame
|
||||
continue;
|
||||
}
|
||||
|
||||
this._removeThread(this.threads[i]);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user