Skip to content

fix fullPathRedirect#149

Merged
pi0 merged 2 commits intonuxt-community:devfrom
heww:dev
Apr 20, 2018
Merged

fix fullPathRedirect#149
pi0 merged 2 commits intonuxt-community:devfrom
heww:dev

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
// 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