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
     }
   }
 }