From 688305a978958c087e3a204fc40db9ea5d2cfc7f Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Tue, 7 Nov 2023 11:04:34 +0000 Subject: [PATCH] Check if critical error before throwing --- .../babel-plugin-react-forget/src/Entrypoint/Program.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts index 7403be7c64..39e820bca5 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts @@ -278,9 +278,8 @@ export function compileProgram( memoSlots: compiledFn.memoSlotsUsed, }); } catch (err) { - handleError(pass, fn.node.loc ?? null, err); - hasCriticalError ||= isCriticalError(err); + handleError(pass, fn.node.loc ?? null, err); return; }