From aa24dcdb2d1fbd28ce1fc9079e3f2fd4eebbb942 Mon Sep 17 00:00:00 2001 From: userquin Date: Tue, 12 Nov 2024 15:22:01 +0100 Subject: [PATCH] chore: return boolean --- .../components/VPDocFooterLastUpdated.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/theme-default/components/VPDocFooterLastUpdated.vue b/src/client/theme-default/components/VPDocFooterLastUpdated.vue index a4e6da61..f2e922e2 100644 --- a/src/client/theme-default/components/VPDocFooterLastUpdated.vue +++ b/src/client/theme-default/components/VPDocFooterLastUpdated.vue @@ -13,20 +13,20 @@ const datetime = ref('') // set time on mounted hook to avoid hydration mismatch due to // potential differences in timezones of the server and clients onMounted(() => { - function findBestLocaleMatch(pageLocale: string): string | undefined { + function findBestLocaleMatch(pageLocale: string) { return navigator.languages.find((userLang) => { if (pageLocale === userLang) - return pageLocale + return true // Edge browser: case for ca-valencia if (pageLocale === 'ca-valencia' && userLang === 'ca-Es-VALENCIA') - return pageLocale + return true // add iso-639 support for Latin America if (userLang.startsWith('es-') && userLang !== 'es-ES' && pageLocale === 'es-419') - return pageLocale + return true - return userLang.startsWith(pageLocale) ? pageLocale : undefined + return userLang.startsWith(pageLocale) }) } watchEffect(() => {