about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWilliam Gibson <william@darn.fish>2023-08-22 04:27:46 -0400
committerWilliam Gibson <william@darn.fish>2023-08-22 04:27:46 -0400
commitd3f525ab28c0187260226b56c53324f9ea3a1833 (patch)
tree3b72173fa1fa6c9645db3e1fa5a63bc5b3901c93 /src
parent4effa88aecb030e240e7eda304b0f8e83fc4acb0 (diff)
downloadvoidsky-d3f525ab28c0187260226b56c53324f9ea3a1833.tar.zst
Don't submit search if query is empty
Diffstat (limited to 'src')
-rw-r--r--src/view/screens/SearchMobile.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/view/screens/SearchMobile.tsx b/src/view/screens/SearchMobile.tsx
index 6a2fca5bc..3b5f771a5 100644
--- a/src/view/screens/SearchMobile.tsx
+++ b/src/view/screens/SearchMobile.tsx
@@ -79,6 +79,8 @@ export const SearchScreen = withAuthRequired(
     }, [setQuery, autocompleteView, store])
 
     const onSubmitQuery = React.useCallback(() => {
+      if (query.length === 0) return
+
       const model = new SearchUIModel(store)
       model.fetch(query)
       setSearchUIModel(model)