Skip to content

Commit 81c87d0

Browse files
committed
fix: do not trim single slash in the url
1 parent b814c3a commit 81c87d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/utils/formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function trimTrailingSlash(path: string): string {
2-
return path.replace(/\/$/, '');
2+
return path.replace(/(?<!^)\/$/, '');
33
}

0 commit comments

Comments
 (0)