Fix GlobalSearch flickering wrong search when filter changed
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

This commit is contained in:
Kalle
2026-04-12 20:53:02 +03:00
parent dbeff06efa
commit d3f46c09cc

View File

@@ -234,7 +234,9 @@ function GlobalSearchContent({
);
const hasQuery = query.length >= 3;
const results = hasQuery ? (fetcher.data?.results ?? []) : [];
const fetchedType = fetcher.data?.type ?? null;
const results =
hasQuery && fetchedType === searchType ? (fetcher.data?.results ?? []) : [];
const weaponResults =
searchType === "weapons" && hasQuery ? filterWeaponResults(query, t) : [];