Skip to content

Commit 8c5f83f

Browse files
committed
fix a little bug in paths.stripRoot
1 parent 5549fd3 commit 8c5f83f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function isAbsolute(path: string): boolean {
143143
// equivalent to relative('/', path)
144144
export function stripRoot(path: string): string {
145145
validateString(path, 'path');
146-
if (path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH) {
146+
while (path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH) {
147147
path = path.slice(1);
148148
}
149149
return path;

0 commit comments

Comments
 (0)