From 1e1ae3034b8dd5e1b222ebdd25c4001f04aeb04e Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 30 Oct 2020 16:21:36 -0700 Subject: [PATCH] Update src/compiler/program.ts Co-authored-by: Sheetal Nandi --- src/compiler/program.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index c6efe7c6b7..c8382594c4 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2234,8 +2234,7 @@ namespace ts { const jsxImport = getJSXRuntimeImport(getJSXImplicitImportBase(options, file), options); if (jsxImport) { // synthesize `import "base/jsx-runtime"` declaration - imports ||= []; - imports.push(createSyntheticImport(jsxImport, file)); + (imports ||= []).push(createSyntheticImport(jsxImport, file)); } }