From 4cdbb26f57d37dc06fe789936b63bf65a19acb88 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Wed, 3 Apr 2019 11:01:00 -0700 Subject: [PATCH] Explicitly check that every extension block has an opcode --- src/extension-support/extension-manager.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extension-support/extension-manager.js b/src/extension-support/extension-manager.js index 30bc6d50d..d3ced5df1 100644 --- a/src/extension-support/extension-manager.js +++ b/src/extension-support/extension-manager.js @@ -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