From bccd06a6326978ca7dc6287880f0a8046d47140c Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Tue, 7 Nov 2023 11:04:35 +0000 Subject: [PATCH] [babel] Simplify noEmit and hasCriticalError check --- .../babel-plugin-react-forget/src/Entrypoint/Program.ts | 4 +--- 1 file changed, 1 insertion(+), 3 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 39e820bca5..b4dfec948b 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts @@ -283,9 +283,7 @@ export function compileProgram( return; } - if (pass.opts.noEmit) { - return; - } else if (!hasCriticalError) { + if (!pass.opts.noEmit && !hasCriticalError) { compiledFns.push({ originalFn: fn, compiledFn }); } };