Fix bug: Check for both "./" and ".\" (#21730)
* Fix bug: Check for both "./" and ".\" * Use normalizeSlashes
This commit is contained in:
parent
3b1a3f8a4d
commit
d35d5d0793
|
@ -462,7 +462,7 @@ namespace ts.Completions.PathCompletions {
|
|||
}
|
||||
|
||||
function normalizeAndPreserveTrailingSlash(path: string) {
|
||||
if (path === "./") {
|
||||
if (normalizeSlashes(path) === "./") {
|
||||
// normalizePath turns "./" into "". "" + "/" would then be a rooted path instead of a relative one, so avoid this particular case.
|
||||
// There is no problem for adding "/" to a non-empty string -- it's only a problem at the beginning.
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue