mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-06 03:00:30 -04:00
Fix issue where a c-block that contained only blocks with unknown opcodes, was causing an import error.
This commit is contained in:
parent
45d564e386
commit
0532f9a80a
1 changed files with 4 additions and 0 deletions
|
@ -833,6 +833,10 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension
|
||||||
// Update commentIndex
|
// Update commentIndex
|
||||||
commentIndex = parsedBlockDesc[1];
|
commentIndex = parsedBlockDesc[1];
|
||||||
}
|
}
|
||||||
|
// Check if innerBlocks is an empty list.
|
||||||
|
// This indicates that all the inner blocks from the sb2 have
|
||||||
|
// unknown opcodes and have been skipped.
|
||||||
|
if (innerBlocks.length === 0) continue;
|
||||||
let previousBlock = null;
|
let previousBlock = null;
|
||||||
for (let j = 0; j < innerBlocks.length; j++) {
|
for (let j = 0; j < innerBlocks.length; j++) {
|
||||||
if (j === 0) {
|
if (j === 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue