From f7cc05482b783c48d9bc912ae8821d2d38dbe9bd Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 23 May 2016 16:25:25 -0700 Subject: [PATCH] Don't lose host 'this' --- 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 c3a79ea58d6..c7dc47b0006 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -980,7 +980,7 @@ namespace ts { // or load all types from the automatic type import fields if (host && host.getDefaultTypeDirectiveNames) { - const commonRoot = computeCommonSourceDirectoryOfFilenames(rootFiles, host.getCurrentDirectory(), host.getCanonicalFileName); + const commonRoot = computeCommonSourceDirectoryOfFilenames(rootFiles, host.getCurrentDirectory(), f => host.getCanonicalFileName(f)); if (commonRoot) { return host.getDefaultTypeDirectiveNames(commonRoot); }