Skip to content

Commit

Permalink
added checking for empty search query (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
0elek authored Jun 2, 2024
1 parent f20bcb6 commit 8e5ae10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 8e5ae10

Please # to comment.