Merge pull request #2746 from notriddle/patch-1

Work around compat break in old index.hbs templates with new searcher.js
This commit is contained in:
Eric Huss 2025-07-08 22:54:11 +00:00 committed by GitHub
commit 0ac89dd826
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -434,7 +434,10 @@ window.search = window.search || {};
function showSearch(yes) {
if (yes) {
loadSearchScript(window.path_to_searchindex_js, 'search-index');
loadSearchScript(
window.path_to_searchindex_js ||
path_to_root + '{{ resource "searchindex.js" }}',
'search-index');
search_wrap.classList.remove('hidden');
searchicon.setAttribute('aria-expanded', 'true');
} else {