mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-08 03:24:56 -04:00
Update VM getPlaygroundData function to remove circular dependency in blockContainer. It wasn't being used by the tests or the playground and it is not an issue with actual project serialization. Update test to stop passing in runtime to blocklyListen function.
This commit is contained in:
parent
e5723e299a
commit
0bf5d8ab90
2 changed files with 2 additions and 2 deletions
|
@ -210,7 +210,7 @@ class VirtualMachine extends EventEmitter {
|
|||
const threadData = this.runtime.threads.filter(thread => thread.target === instance.editingTarget);
|
||||
// Remove the target key, since it's a circular reference.
|
||||
const filteredThreadData = JSON.stringify(threadData, (key, value) => {
|
||||
if (key === 'target') return;
|
||||
if (key === 'target' || key === 'blockContainer') return;
|
||||
return value;
|
||||
}, 2);
|
||||
this.emit('playgroundData', {
|
||||
|
|
|
@ -45,7 +45,7 @@ test('stack click activates the stack', t => {
|
|||
blockContainer.blocklyListen({
|
||||
blockId: blockId,
|
||||
element: 'stackclick'
|
||||
}, vm.runtime);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue