diff --git a/src/runtime/utils/formatter.ts b/src/runtime/utils/formatter.ts index 6afc5a4..af97bb7 100644 --- a/src/runtime/utils/formatter.ts +++ b/src/runtime/utils/formatter.ts @@ -1,3 +1,6 @@ export function trimTrailingSlash(path: string): string { - return path.replace(/(? 1 && path.slice(-1) === '/') { + return path.slice(0, -1); + } + return path; }