Update src/compiler/program.ts

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
This commit is contained in:
Wesley Wigham 2020-10-30 16:21:36 -07:00 committed by GitHub
parent fe94a2180c
commit 1e1ae3034b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));
}
}