Remove reload on change language

This commit is contained in:
2021-08-28 18:34:26 +02:00
parent b8d70e13a8
commit becc744193
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ export default defineComponent({
const $router = useRouter()
const changeLanguage = () => useAsync(() => {
i18n.setLocale(i18n.locale === 'fr' ? 'en' : 'fr')
if ($router.currentRoute.fullPath.includes('blog') || $router.currentRoute.fullPath === '/') {
if ($router.currentRoute.fullPath.includes('blog')) {
window.location.reload()
}
})

View File

@@ -99,7 +99,7 @@ export default defineComponent({
const $router = useRouter()
const changeLanguage = () => useAsync(() => {
i18n.setLocale(i18n.locale === 'fr' ? 'en' : 'fr')
if ($router.currentRoute.fullPath.includes('blog') || $router.currentRoute.fullPath === '/') {
if ($router.currentRoute.fullPath.includes('blog')) {
window.location.reload()
}
})