Skip to content

Commit

Permalink
fix: Create correct baseroute for switchlocalepath (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
dipsaus9 authored and paulgv committed Jan 20, 2019
1 parent aefb7d9 commit 909062f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ function switchLocalePathFactory (i18nPath) {
if (!name) {
return ''
}
const baseRoute = Object.assign({}, this.$route , { name })

const { params, ...routeCopy } = this.$route
const baseRoute = Object.assign({}, routeCopy, { name, params: { '0': params.pathMatch } })
let path = this.localePath(baseRoute, locale)

// Handle different domains
Expand Down

0 comments on commit 909062f

Please sign in to comment.