Skip to content

Node.js based forum software built for the modern web

fix: #8968, don't show topic search if search is not enabled

Barış Soner Uşaklıc8554b78b9e9
diff --git a/public/src/app.js b/public/src/app.js
index 4bec1e1e69..7e61d467be 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -444,6 +444,9 @@ app.cacheBuster = null;
}
app.enableTopicSearch = function (options) {
+ if (!config.searchEnabled) {
+ return;
+ }
/* eslint-disable-next-line */
var searchOptions = Object.assign({ in: 'titles' }, options.searchOptions);
var quickSearchResults = options.searchElements.resultEl;