Redirect to home page when change language

This commit is contained in:
2020-12-17 18:03:58 +01:00
parent 7e01316426
commit 77eb0fd11b

View File

@@ -120,10 +120,8 @@ export default {
this.scrollPosition = window.scrollY
},
async changeLanguage(lang) {
await this.$router.push('/')
this.$i18n.setLocale(lang)
if (this.$router.currentRoute.fullPath.includes('blog')) {
await this.$router.push('/blog')
}
},
},
mounted() {