From f0d2b7e121c1fc5d11ac1758a13b62e4a4365218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=80=89=E5=84=AA=E6=82=9F?= Date: Sun, 18 Oct 2020 15:53:31 +0900 Subject: [PATCH] fix: fix not to fail when no locales --- src/client/theme-default/components/NavBarLinks.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/theme-default/components/NavBarLinks.ts b/src/client/theme-default/components/NavBarLinks.ts index 88075bb5..d34b8c40 100644 --- a/src/client/theme-default/components/NavBarLinks.ts +++ b/src/client/theme-default/components/NavBarLinks.ts @@ -44,6 +44,9 @@ export default { const localeCandidates = computed(() => { const locales = siteData.value.themeConfig.locales + if (!locales) { + return null + } const localeKeys = Object.keys(locales) if (localeKeys.length <= 1) { return null