[fix] search
This commit is contained in:
parent
0a3ee07fc4
commit
b7efbc647e
|
@ -309,6 +309,9 @@ if (stellar.search.service) {
|
||||||
stellar.jQuery(() => {
|
stellar.jQuery(() => {
|
||||||
stellar.loadScript('/js/search/local-search.js', { defer: true }).then(function () {
|
stellar.loadScript('/js/search/local-search.js', { defer: true }).then(function () {
|
||||||
var $inputArea = $("input#search-input");
|
var $inputArea = $("input#search-input");
|
||||||
|
if ($inputArea.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var $resultArea = document.querySelector("div#search-result");
|
var $resultArea = document.querySelector("div#search-result");
|
||||||
$inputArea.focus(function() {
|
$inputArea.focus(function() {
|
||||||
var path = stellar.search[stellar.search.service]?.path || '/search.json';
|
var path = stellar.search[stellar.search.service]?.path || '/search.json';
|
||||||
|
|
Loading…
Reference in New Issue