We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0b86f4 commit fa1d647Copy full SHA for fa1d647
source/assets/js/search.js
@@ -49,6 +49,11 @@ function processResult(result) {
49
}
50
51
function Search(config) {
52
+ if (!config.appId || !config.apiKey || !config.prefix) {
53
+ console.warn("Algolia environment variables not configured - search disabled");
54
+ return;
55
+ }
56
+
57
this.client = new AlgoliaSearch(config.appId, config.apiKey);
58
this.prefix = config.prefix;
59
this.searchNumber = 0;
@@ -98,6 +103,8 @@ Search.indexes = {
98
103
};
99
104
100
105
Search.prototype.search = function (query) {
106
+ if (!this.client) return;
107
101
108
if (query === this.lastQuery) {
102
109
return;
110
0 commit comments