Skip to content

Commit 36b8172

Browse files
committed
Fix failed tests
1 parent d7e1d34 commit 36b8172

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/compiler/commandLineParser.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,10 @@ namespace ts {
649649
// Get files of supported extensions in their order of resolution
650650
for (const extension of supportedExtensions) {
651651
for (const fileName of potentialFiles) {
652+
if (!fileExtensionIs(fileName, extension)) {
653+
continue;
654+
}
655+
652656
// .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension,
653657
// lets pick them when its turn comes up
654658
if (extension === ".ts" && fileExtensionIs(fileName, ".d.ts")) {
@@ -669,8 +673,10 @@ namespace ts {
669673
}
670674
}
671675

672-
filesSeen[fileName] = true;
673-
fileNames.push(fileName);
676+
if (!filesSeen[fileName]) {
677+
filesSeen[fileName] = true;
678+
fileNames.push(fileName);
679+
}
674680
}
675681
}
676682
}

0 commit comments

Comments
 (0)