From 13a8dc11b03188563b3107400c9b6ddd3d872c9c Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Fri, 7 Oct 2016 08:31:53 -0700 Subject: [PATCH] Fix array conditional --- src/compiler/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index e300ac22fe5..8e39731abc1 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -358,7 +358,7 @@ namespace ts { // load type declarations specified via 'types' argument or implicitly from types/ and node_modules/@types folders const typeReferences: string[] = getAutomaticTypeDirectiveNames(options, host); - if (typeReferences) { + if (typeReferences.length) { // This containingFilename needs to match with the one used in managed-side const containingFilename = combinePaths(host.getCurrentDirectory(), "__inferred type names__.ts"); const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename);