diff --git a/src/extension-support/extension-load-helper.js b/src/extension-support/extension-load-helper.js index 8f7c8b26..ccc1805c 100644 --- a/src/extension-support/extension-load-helper.js +++ b/src/extension-support/extension-load-helper.js @@ -38,6 +38,7 @@ const clearScratchAPI = () => { globalScratch = undefined; } if (loadingPromise) loadingPromise.resolve(); + loadingPromise = undefined; } }; @@ -188,12 +189,12 @@ const loadExtension = async (vm, url) => { return pm.promise .then((v) => { if (scriptError) { - loadingPromise = undefined; throw scriptError; } return v; }) .finally(() => { + loadingPromise = undefined; removeScript(); }); };