diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 690269d..2ab7a0b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -47,7 +47,7 @@ // Search svgs: const searchSvgs = () => { - $searchParam = searchTerm; + $searchParam = searchTerm || null; loadSvgs(); filteredSvgs = allSvgs.filter((svg: iSVG) => { let svgTitle = svg.title.toLowerCase(); diff --git a/src/routes/directory/[slug]/+page.svelte b/src/routes/directory/[slug]/+page.svelte index 74feba0..5867154 100644 --- a/src/routes/directory/[slug]/+page.svelte +++ b/src/routes/directory/[slug]/+page.svelte @@ -28,7 +28,7 @@ } const searchSvgs = () => { - $searchParam = searchTerm; + $searchParam = searchTerm || null; return (filteredSvgs = svgsByCategory.filter((svg: iSVG) => { let svgTitle = svg.title.toLowerCase(); return svgTitle.includes(searchTerm.toLowerCase());