We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5549fd3 commit 8c5f83fCopy full SHA for 8c5f83f
common/src/paths.ts
@@ -143,7 +143,7 @@ export function isAbsolute(path: string): boolean {
143
// equivalent to relative('/', path)
144
export function stripRoot(path: string): string {
145
validateString(path, 'path');
146
- if (path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH) {
+ while (path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH) {
147
path = path.slice(1);
148
}
149
return path;
0 commit comments