mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-08 20:14:00 -04:00
Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed).
This commit is contained in:
parent
522b5e1a8e
commit
fbee37e915
9 changed files with 58 additions and 16 deletions
test/integration
|
@ -192,7 +192,9 @@ test('edge activated hat should trigger for both sprites when sprite is cloned',
|
|||
val + Object.keys(target._edgeActivatedHatValues).length, 0);
|
||||
t.equal(numTargetEdgeHats, 1);
|
||||
|
||||
vm.runtime.targets.push(vm.runtime.targets[1].makeClone());
|
||||
const cloneTarget = vm.runtime.targets[1].makeClone();
|
||||
vm.runtime.targets.push(cloneTarget);
|
||||
vm.runtime.addExecutable(cloneTarget);
|
||||
|
||||
vm.runtime._step();
|
||||
// Check that the runtime's _edgeActivatedHatValues object has two separate keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue