Merge pull request #11448 from Microsoft/fix_array_condition

Fix array conditional
This commit is contained in:
Andy
2016-10-07 10:03:06 -07:00
committed by GitHub

View File

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