Explicitly check that every extension block has an opcode

This commit is contained in:
Christopher Willis-Ford 2019-04-03 11:01:00 -07:00
parent 87a88e2caf
commit 4cdbb26f57

View file

@ -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