Skip to content
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

fix fullPathRedirect #149

Merged
merged 2 commits into from
Apr 20, 2018
Merged

fix fullPathRedirect #149

merged 2 commits into from
Apr 20, 2018

Conversation

heww
Copy link
Contributor

@heww heww commented Apr 18, 2018

route.fullPath is the full resolved URL including query and hash, route. path always resolved as an absolute path

isRelativeURL not work for path with query, so from.split('?')[0] only pass the path to isRelativeURL

@pi0 pi0 requested a review from breakingrobot April 18, 2018 07:31
lib/core/auth.js Outdated
@@ -313,7 +313,7 @@ export default class Auth {

// Apply rewrites
if (this.options.rewriteRedirects) {
if (name === 'login' && isRelativeURL(from) && !isSameURL(to, from)) {
if (name === 'login' && isRelativeURL(from.split('?')[0]) && !isSameURL(to, from)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you change isRelativeURL to directly include that ?

@heww
Copy link
Contributor Author

heww commented Apr 20, 2018

@breakingrobot isRelativeURL changed

@pi0 pi0 merged commit a37d599 into nuxt-community:dev Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants