summaryrefslogtreecommitdiff
path: root/modules/internal
diff options
context:
space:
mode:
authorEvan Welsh <contact@evanwelsh.com>2022-01-30 15:34:49 -0800
committerPhilip Chimento <philip.chimento@gmail.com>2022-01-31 20:21:10 -0800
commit700fc11d8b3a1f55e2785c5c9f6fbc317f7cc9b8 (patch)
tree402c21cc1becb859240a6338b6056a06d571a494 /modules/internal
parent29f38d0f48bd5e52201bde267d813364e1da2d05 (diff)
downloadgjs-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.js2
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
*/