Skip to content

Commit d34916a

Browse files
author
Andy
authored
Merge pull request #11448 from Microsoft/fix_array_condition
Fix array conditional
2 parents e0e8cf0 + 13a8dc1 commit d34916a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ namespace ts {
358358
// load type declarations specified via 'types' argument or implicitly from types/ and node_modules/@types folders
359359
const typeReferences: string[] = getAutomaticTypeDirectiveNames(options, host);
360360

361-
if (typeReferences) {
361+
if (typeReferences.length) {
362362
// This containingFilename needs to match with the one used in managed-side
363363
const containingFilename = combinePaths(host.getCurrentDirectory(), "__inferred type names__.ts");
364364
const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename);

0 commit comments

Comments
 (0)