From a4f610df82d7b8262091381c64ea71519aedb352 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Fri, 7 Oct 2016 08:41:23 -0700 Subject: [PATCH] Inline calculation of resolvedPath --- src/compiler/program.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index e300ac22fe5..ec03cfa3f3d 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1311,7 +1311,6 @@ namespace ts { for (let i = 0; i < moduleNames.length; i++) { const resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); - const resolvedPath = resolution ? toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName) : undefined; // add file to program only if: // - resolution was successful @@ -1333,7 +1332,7 @@ namespace ts { } else if (shouldAddFile) { findSourceFile(resolution.resolvedFileName, - resolvedPath, + toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, /*isReference*/ false, file, skipTrivia(file.text, file.imports[i].pos),