Skip to content

Commit e0e8cf0

Browse files
author
Andy
authored
Merge pull request #11449 from Microsoft/resolved_path
Inline calculation of resolvedPath
2 parents 49a6391 + a4f610d commit e0e8cf0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,6 @@ namespace ts {
13111311
for (let i = 0; i < moduleNames.length; i++) {
13121312
const resolution = resolutions[i];
13131313
setResolvedModule(file, moduleNames[i], resolution);
1314-
const resolvedPath = resolution ? toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName) : undefined;
13151314

13161315
// add file to program only if:
13171316
// - resolution was successful
@@ -1333,7 +1332,7 @@ namespace ts {
13331332
}
13341333
else if (shouldAddFile) {
13351334
findSourceFile(resolution.resolvedFileName,
1336-
resolvedPath,
1335+
toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName),
13371336
/*isDefaultLib*/ false, /*isReference*/ false,
13381337
file,
13391338
skipTrivia(file.text, file.imports[i].pos),

0 commit comments

Comments
 (0)