This commit is contained in:
Sheetal Nandi
2019-12-17 13:59:56 -08:00
parent ad3af6cbf6
commit 165758f6e8
+3 -3
View File
@@ -171,7 +171,7 @@ namespace ts.moduleSpecifiers {
return match ? match.length : 0;
}
function comparePathsByNumberOfDirectrorySeparators(a: string, b: string) {
function comparePathsByNumberOfDirectorySeparators(a: string, b: string) {
return compareValues(
numberOfDirectorySeparators(a),
numberOfDirectorySeparators(b)
@@ -227,7 +227,7 @@ namespace ts.moduleSpecifiers {
});
if (pathsInDirectory) {
if (pathsInDirectory.length > 1) {
pathsInDirectory.sort(comparePathsByNumberOfDirectrorySeparators);
pathsInDirectory.sort(comparePathsByNumberOfDirectorySeparators);
}
sortedPaths.push(...pathsInDirectory);
}
@@ -237,7 +237,7 @@ namespace ts.moduleSpecifiers {
}
if (allFileNames.size) {
const remainingPaths = arrayFrom(allFileNames.values());
if (remainingPaths.length > 1) remainingPaths.sort(comparePathsByNumberOfDirectrorySeparators);
if (remainingPaths.length > 1) remainingPaths.sort(comparePathsByNumberOfDirectorySeparators);
sortedPaths.push(...remainingPaths);
}
return sortedPaths;