-
-
Notifications
You must be signed in to change notification settings - Fork 5k
decode URI when aborting transition (Fix #760) #1020
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 i 10000 n to your account
Conversation
Any idea when this will be merged? @dfmelicor |
@@ -45,7 +46,8 @@ export default class RouteTransition { | |||
// on initial load, it gets caught in an infinite loop. | |||
const abortingOnLoad = !this.from.path && this.to.path === '/' | |||
if (!abortingOnLoad) { | |||
this.router.replace(this.from.path || '/') | |||
const path = this.from.path ? tryDecode(this.from.path, true) : '/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a little comment over here to point out why we need to call tryDecode
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
(Fixes #760)
Problem
When aborting a transition, and the URL contained escaped chars, the chars would be escaped again. I added a decode in between to make this work again.