mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-12 23:36:28 -05:00
Drive-by replacement of substr with slice.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user