From bb2ca84549bf298943e24b2b105334d309756d97 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 29 Oct 2024 21:25:23 +0000 Subject: [PATCH] Drive-by replacement of `substr` with `slice`. --- src/compiler/path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/path.ts b/src/compiler/path.ts index 32fa57ec806..4d283266d91 100644 --- a/src/compiler/path.ts +++ b/src/compiler/path.ts @@ -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;