-
Notifications
You must be signed in to change notification settings - Fork 961
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
Consider the full path in changing PUSH to REPLACE #167
Conversation
let { pathname, search } = getCurrentLocation() | ||
let currentPath = pathname + search | ||
let path = nextLocation.pathname + nextLocation.search | ||
const prevPath = createPath(location) |
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.
This is not 100% correct, since it doesn't e.g. account for basename
when using browser history. In practice that's not an issue, though, since basename
doesn't change.
This should be the "final" createPath
, but I can't access that here.
LGTM. Thanks for tackling that. As for your question why I used |
I believe in a base |
Consider the full path in changing PUSH to REPLACE
@taurose I think there might be a separate related race condition when using async routes in |
@taion Yeah that seems like a feature we lost from 0.13. Since history doesn't deal with data loading (or anything that happens after the URL changes), I'd say this should be handled by the router. |
Yeah, the router can just use |
Fixes #166
Organizing the changelog a bit ahead of adding something for #141 to hopefully make it a bit more usable.