From 85565d95d5f600718d239782d58d06c6c5efc37c Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Tue, 30 May 2023 00:26:30 -0700 Subject: Add a comment --- src/bun.js/bindings/CommonJSModuleRecord.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/bun.js/bindings/CommonJSModuleRecord.cpp') 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; -- cgit v1.2.3