Skip to content

Commit

Permalink
fix: ensure global script errors reach console (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Sep 11, 2021
1 parent 796a511 commit 6e0febe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/es-module-shims.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ function processScript (script, dynamic) {
script.dispatchEvent(new Event('load'));
}).catch(e => {
script.dispatchEvent(new Event('load'));
// note onerror can throw itself
setTimeout(() => { throw e; });
onerror(e);
});
if (isReadyScript)
lastStaticLoadPromise = loadPromise.then(staticLoadCheck, staticLoadCheck);
lastStaticLoadPromise = loadPromise.then(staticLoadCheck);
}
else if (type === 'importmap') {
// we dont currently support multiple, external or dynamic imports maps in polyfill mode to match native
Expand Down

0 comments on commit 6e0febe

Please sign in to comment.