diff --git a/lib/default-theme/NavLinks.vue b/lib/default-theme/NavLinks.vue index 74bc12c88a..b91d219c4f 100644 --- a/lib/default-theme/NavLinks.vue +++ b/lib/default-theme/NavLinks.vue @@ -30,10 +30,10 @@ export default { components: { OutboundLink, NavLink, DropdownLink }, computed: { userNav () { - if (Array.isArray(this.$site.themeConfig.nav)) { - return this.$site.themeConfig.nav - } - return this.$site.themeConfig.nav[this.$basepath] + const { nav } = this.$site.themeConfig + if (Array.isArray(nav)) return nav + if (typeof nav === 'object') return nav[this.$basepath] + return [] }, nav () { if (this.$site.langs && this.$site.langs.length) {