mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Fix bug: Check for both "./" and ".\" (#21730)
* Fix bug: Check for both "./" and ".\" * Use normalizeSlashes
This commit is contained in:
@@ -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 "";
|
||||
|
||||
Reference in New Issue
Block a user