From 8e5ae109bfbd152b497c8b5f8299e33d23918303 Mon Sep 17 00:00:00 2001 From: elek <87550550+0elek@users.noreply.github.com> Date: Sun, 2 Jun 2024 09:37:23 +0200 Subject: [PATCH] added checking for empty search query (#852) --- pages/index.page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index f85a21dd..b3ca86d1 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -107,7 +107,9 @@ const Home = () => { const handleSearchSubmit = (value: string) => { Analytics.performedSearch(value.trim()) - router.push(`/package/${value.trim()}`) + if (value ?? '') { + router.push(`/package/${value.trim()}`) + } } return (