mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Merge pull request #1959 from ktbee/declare-const-once
Declare const once to be reused in for loop
This commit is contained in:
commit
cff1c2c0a4
1 changed files with 2 additions and 2 deletions
|
@ -1556,6 +1556,8 @@ class Runtime extends EventEmitter {
|
|||
}
|
||||
const instance = this;
|
||||
const newThreads = [];
|
||||
// Look up metadata for the relevant hat.
|
||||
const hatMeta = instance._hats[requestedHatOpcode];
|
||||
|
||||
for (const opts in optMatchFields) {
|
||||
if (!optMatchFields.hasOwnProperty(opts)) continue;
|
||||
|
@ -1602,8 +1604,6 @@ class Runtime extends EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
// Look up metadata for the relevant hat.
|
||||
const hatMeta = instance._hats[requestedHatOpcode];
|
||||
if (hatMeta.restartExistingThreads) {
|
||||
// If `restartExistingThreads` is true, we should stop
|
||||
// any existing threads starting with the top block.
|
||||
|
|
Loading…
Reference in a new issue