kopia lustrzana https://github.com/wagtail/wagtail
Fix header search when q URL param is not present
rodzic
f35d4a966e
commit
d4b69cbfc1
|
@ -270,7 +270,7 @@ $(() => {
|
|||
const search = function () {
|
||||
const newQuery = $input.val();
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
const currentQuery = searchParams.get('q');
|
||||
const currentQuery = searchParams.get('q') || '';
|
||||
// only do the query if it has changed for trimmed queries
|
||||
// for example - " " === "" and "firstword " ==== "firstword"
|
||||
if (currentQuery.trim() !== newQuery.trim()) {
|
||||
|
|
Ładowanie…
Reference in New Issue