Drive-by replacement of substr with slice.

This commit is contained in:
Daniel Rosenwasser 2024-10-29 21:25:23 +00:00
parent 73043ce8d0
commit bb2ca84549

View File

@ -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;