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

Currently breaks if hashes are used in the URL. #12

Closed
jwahdatehagh opened this issue Feb 7, 2018 · 1 comment
Closed

Currently breaks if hashes are used in the URL. #12

jwahdatehagh opened this issue Feb 7, 2018 · 1 comment

Comments

@jwahdatehagh
Copy link

jwahdatehagh commented Feb 7, 2018

E.g.switchLocalePath turns /#intro into /fr#intro/, which results in the following error: DOMException: Failed to execute 'querySelector' on 'Document': '#intro/' is not a valid selector..

This question is available on Nuxt.js community (#c37)
@jwahdatehagh
Copy link
Author

jwahdatehagh commented Feb 7, 2018

This is the bad guy (i18n.routing.plugin.js):

const baseRoute = Object.assign({}, route, { name })
// Resolve localized route
const resolved = this.$router.resolve(baseRoute)
// Handle homepage exception
if (route.name === 'index') {
  href += '/'
}

jwahdatehagh added a commit to jwahdatehagh/nuxt-i18n that referenced this issue Feb 7, 2018
@paulgv paulgv closed this as completed in 2e0649a Feb 8, 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

No branches or pull requests

1 participant