Commit 07390ae
fix: remove incorrect array destructuring in mobile search (#2124)
The search was crashing because of incorrect array destructuring on
the useDebounce hook return value. useDebounce returns a string, not
an array, so using `const [query] = useDebounce(...)` caused query
to be undefined when the search string was empty.
This resulted in passing { text: undefined } to the tRPC endpoint,
which failed Zod validation expecting a string.
Fixed by removing the array destructuring: const query = useDebounce(...)
Co-authored-by: Claude <[email protected]>1 parent c34f70d commit 07390ae
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments