fix: TypeError: Cannot read properties of null (reading 'config') (#12356)

This commit is contained in:
Sivin Varghese
2025-09-03 17:07:34 +05:30
committed by GitHub
parent 4cba32b2d7
commit 778c576ad7

View File

@@ -21,6 +21,9 @@ const articleUiFlags = useMapGetter('article/uiFlags');
const locale = computed(() => {
const { locale: selectedLocale } = i18n;
if (!portal.value || !portal.value.config) return null;
const { allowed_locales: allowedLocales } = portal.value.config;
return getMatchingLocale(selectedLocale.value, allowedLocales);
});