mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Explicitly check that every extension block has an opcode
This commit is contained in:
parent
87a88e2caf
commit
4cdbb26f57
1 changed files with 4 additions and 0 deletions
|
@ -390,6 +390,10 @@ class ExtensionManager {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (!blockInfo.opcode) {
|
||||||
|
throw new Error('Missing opcode for block');
|
||||||
|
}
|
||||||
|
|
||||||
blockInfo.func = blockInfo.func ? this._sanitizeID(blockInfo.func) : blockInfo.opcode;
|
blockInfo.func = blockInfo.func ? this._sanitizeID(blockInfo.func) : blockInfo.opcode;
|
||||||
|
|
||||||
// Avoid promise overhead if possible
|
// Avoid promise overhead if possible
|
||||||
|
|
Loading…
Reference in a new issue