mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -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;
|
||||
default:
|
||||
if (!blockInfo.opcode) {
|
||||
throw new Error('Missing opcode for block');
|
||||
}
|
||||
|
||||
blockInfo.func = blockInfo.func ? this._sanitizeID(blockInfo.func) : blockInfo.opcode;
|
||||
|
||||
// Avoid promise overhead if possible
|
||||
|
|
Loading…
Reference in a new issue