diff options
author | Evan Welsh <contact@evanwelsh.com> | 2022-01-30 15:34:49 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2022-01-31 20:21:10 -0800 |
commit | 700fc11d8b3a1f55e2785c5c9f6fbc317f7cc9b8 (patch) | |
tree | 402c21cc1becb859240a6338b6056a06d571a494 /modules/internal | |
parent | 29f38d0f48bd5e52201bde267d813364e1da2d05 (diff) | |
download | gjs-700fc11d8b3a1f55e2785c5c9f6fbc317f7cc9b8.tar.gz |
modules: Ensure ImportError is an instance of globalThis.Error
If we throw the error with the wrong global (e.g. the internal
global) then ImportError is no longer an instance of
globalThis.Error
Diffstat (limited to 'modules/internal')
-rw-r--r-- | modules/internal/internalLoader.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/internal/internalLoader.js b/modules/internal/internalLoader.js index b1023132..b7679705 100644 --- a/modules/internal/internalLoader.js +++ b/modules/internal/internalLoader.js @@ -23,7 +23,7 @@ /** * Thrown when there is an error importing a module. */ -export class ImportError extends Error { +export class ImportError extends moduleGlobalThis.Error { /** * @param {string | undefined} message the import error message */ |