mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-14 01:09:51 -04:00
Merge pull request #1923 from ktbee/missing-block-early-exit
Add early exit for non-existent block
This commit is contained in:
commit
d5c2991a25
1 changed files with 4 additions and 0 deletions
|
@ -990,6 +990,10 @@ class Blocks {
|
|||
*/
|
||||
blockToXML (blockId, comments) {
|
||||
const block = this._blocks[blockId];
|
||||
// block should exist, but currently some blocks' next property point
|
||||
// to a blockId for non-existent blocks. Until we track down that behavior,
|
||||
// this early exit allows the project to load.
|
||||
if (!block) return;
|
||||
// Encode properties of this block.
|
||||
const tagName = (block.shadow) ? 'shadow' : 'block';
|
||||
let xmlString =
|
||||
|
|
Loading…
Reference in a new issue