mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 01:39:28 -06:00
Drive-by replacement of substr with slice.
This commit is contained in:
parent
73043ce8d0
commit
bb2ca84549
@ -690,7 +690,7 @@ export function removeTrailingDirectorySeparator(path: string): string;
|
||||
/** @internal */
|
||||
export function removeTrailingDirectorySeparator(path: string) {
|
||||
if (hasTrailingDirectorySeparator(path)) {
|
||||
return path.substr(0, path.length - 1);
|
||||
return path.slice(0, -1);
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user