10000 fix: clean more than two consecutive slashes by danielroe · Pull Request #3652 · vuejs/vue-router · GitHub
[go: up one dir, main page]

Skip to content

fix: clean more than two consecutive slashes #3652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: clean more than two consecutive slashes
  • Loading branch information
danielroe committed Oct 25, 2021
commit 05d474538bea05af03175c3806c902c7a88d0b7c
2 changes: 1 addition & 1 deletion src/util/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ export function parsePath (path: string): {
}

export function cleanPath (path: string): string {
return path.replace(/\/\//g, '/')
return path.replace(/\/+/g, '/')
}
0