aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/CommonJSModuleRecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/CommonJSModuleRecord.cpp')
-rw-r--r--src/bun.js/bindings/CommonJSModuleRecord.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/bindings/CommonJSModuleRecord.cpp b/src/bun.js/bindings/CommonJSModuleRecord.cpp
index f70fff10d..ba49f0e14 100644
--- a/src/bun.js/bindings/CommonJSModuleRecord.cpp
+++ b/src/bun.js/bindings/CommonJSModuleRecord.cpp
@@ -393,6 +393,10 @@ JSC::SourceCode createCommonJSModule(
result = moduleObject->getIfPropertyExists(globalObject, clientData->builtinNames().exportsPublicName());
if (UNLIKELY(throwScope.exception())) {
+ // Unlike getters on properties of the exports object
+ // When the exports object itself is a getter and it throws
+ // There's not a lot we can do
+ // so we surface that error
globalObject->requireMap()->remove(globalObject, requireMapKey);
throwScope.release();
return;