Skip to content

Commit d35d5d0

Browse files
author
Andy
authored
Fix bug: Check for both "./" and ".\" (#21730)
* Fix bug: Check for both "./" and ".\" * Use normalizeSlashes
1 parent 3b1a3f8 commit d35d5d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/pathCompletions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ namespace ts.Completions.PathCompletions {
462462
}
463463

464464
function normalizeAndPreserveTrailingSlash(path: string) {
465-
if (path === "./") {
465+
if (normalizeSlashes(path) === "./") {
466466
// normalizePath turns "./" into "". "" + "/" would then be a rooted path instead of a relative one, so avoid this particular case.
467467
// There is no problem for adding "/" to a non-empty string -- it's only a problem at the beginning.
468468
return "";

0 commit comments

Comments
 (0)