From b19bd89bf3ec5809cff5417370a65b91b18438f4 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Tue, 24 Apr 2018 16:14:36 +0800 Subject: [PATCH] fix: algolia regression - missing options (close #234) --- lib/default-theme/Navbar.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/default-theme/Navbar.vue b/lib/default-theme/Navbar.vue index 62753149cc..f4a9002a37 100644 --- a/lib/default-theme/Navbar.vue +++ b/lib/default-theme/Navbar.vue @@ -28,9 +28,11 @@ import NavLinks from './NavLinks.vue' export default { components: { SidebarButton, NavLinks, SearchBox, AlgoliaSearchBox }, computed: { + algolia () { + return this.$themeLocaleConfig.algolia || this.$site.themeConfig.algolia || {} + }, isAlgoliaSearch () { - const algolia = this.$themeLocaleConfig.algolia || this.$site.themeConfig.algolia || {} - return algolia && algolia.apiKey && algolia.indexName + return this.algolia && this.algolia.apiKey && this.algolia.indexName } } }