mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Declare const once to be resused in for loop
This commit is contained in:
parent
c5abcf5888
commit
356a4e7880
1 changed files with 2 additions and 2 deletions
|
@ -1461,6 +1461,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;
|
||||
|
@ -1507,8 +1509,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