mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -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 instance = this;
|
||||||
const newThreads = [];
|
const newThreads = [];
|
||||||
|
// Look up metadata for the relevant hat.
|
||||||
|
const hatMeta = instance._hats[requestedHatOpcode];
|
||||||
|
|
||||||
for (const opts in optMatchFields) {
|
for (const opts in optMatchFields) {
|
||||||
if (!optMatchFields.hasOwnProperty(opts)) continue;
|
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 (hatMeta.restartExistingThreads) {
|
||||||
// If `restartExistingThreads` is true, we should stop
|
// If `restartExistingThreads` is true, we should stop
|
||||||
// any existing threads starting with the top block.
|
// any existing threads starting with the top block.
|
||||||
|
|
Loading…
Reference in a new issue