diff --git a/src/routes/app/add-ons/+page.svelte b/src/routes/app/add-ons/+page.svelte index 82d97bd49..dd15175bf 100644 --- a/src/routes/app/add-ons/+page.svelte +++ b/src/routes/app/add-ons/+page.svelte @@ -39,7 +39,6 @@ const url = new URL($page.url); // make a copy const formData = new FormData(event.currentTarget as HTMLFormElement); const query = formData.get("query") ?? ""; - if (!query) return; url.searchParams.set("query", query as string); goto(url); } diff --git a/src/routes/app/projects/+page.svelte b/src/routes/app/projects/+page.svelte index 53e2e94ed..0ee16daf3 100644 --- a/src/routes/app/projects/+page.svelte +++ b/src/routes/app/projects/+page.svelte @@ -22,7 +22,6 @@ const url = new URL($page.url); // make a copy const formData = new FormData(event.currentTarget as HTMLFormElement); const query = formData.get("query") ?? ""; - if (!query) return; url.searchParams.set("query", query as string); goto(url); } diff --git a/src/routes/app/projects/[id]-[slug]/+page.ts b/src/routes/app/projects/[id]-[slug]/+page.ts index b8ba2b18a..9b07b3f91 100644 --- a/src/routes/app/projects/[id]-[slug]/+page.ts +++ b/src/routes/app/projects/[id]-[slug]/+page.ts @@ -8,8 +8,8 @@ export async function load({ params, url, parent, fetch }) { const breadcrumbs = await breadcrumbTrail(parent, [ { href: url.pathname, title: project.title }, ]); - const query = url.searchParams.get("q"); - const cursor = url.searchParams.get("cursor"); + const query = url.searchParams.get("q") ?? ""; + const cursor = url.searchParams.get("cursor") ?? ""; const documents = search(query, { cursor, project: project.id }); return { breadcrumbs,