Fix re-requesting package search when current params from initial query
This commit is contained in:
parent
4578b30ea2
commit
8465b620d1
|
@ -24,7 +24,10 @@ export function initPackageSearch(sectionElement, sectionData, newParams)
|
||||||
};
|
};
|
||||||
searchForm.dataset.initialized = true;
|
searchForm.dataset.initialized = true;
|
||||||
}
|
}
|
||||||
const currentParams = sectionData.state.params;
|
let currentParams = sectionData.state.params;
|
||||||
|
if (currentParams && currentParams.startsWith('?')) {
|
||||||
|
currentParams = currentParams.substr(1);
|
||||||
|
}
|
||||||
const hasNewParams = newParams.length >= 1;
|
const hasNewParams = newParams.length >= 1;
|
||||||
if (!hasNewParams) {
|
if (!hasNewParams) {
|
||||||
if (currentParams !== undefined) {
|
if (currentParams !== undefined) {
|
||||||
|
|
Loading…
Reference in New Issue