Skip to content

Commit 9024032

Browse files
committed
use typeof
1 parent a32f44f commit 9024032

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace ts {
4646
const compilerOptions = host.getCompilerOptions();
4747
const languageVersion = compilerOptions.target || ScriptTarget.ES3;
4848
const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None;
49-
const allowSyntheticDefaultImports = compilerOptions.hasOwnProperty("allowSyntheticDefaultImports") ? compilerOptions.allowSyntheticDefaultImports : modulekind === ModuleKind.System;
49+
const allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ModuleKind.System;
5050

5151
const emitResolver = createResolver();
5252

0 commit comments

Comments
 (0)