Skip to content

Commit e53f9a9

Browse files
kalu5taskylizard
authored andcommitted
fix: don't navigate when there is no search content (npmx-dev#710)
1 parent d9f66a4 commit e53f9a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/pages/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const { focused: isSearchFocused } = useFocus(searchInputRef)
77
88
async function search() {
99
const query = searchQuery.value.trim()
10+
if (!query) return
1011
await navigateTo({
1112
path: '/search',
1213
query: query ? { q: query } : undefined,

0 commit comments

Comments
 (0)