mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 11:33:26 +00:00
chore: catch search
This commit is contained in:
@@ -14,7 +14,7 @@ export default function SearchScreen() {
|
||||
|
||||
const handleSearchChange = async (query: string) => {
|
||||
if (query.length > 0) {
|
||||
const results = await fetchSearchResults(query);
|
||||
const results = await fetchSearchResults(query).catch(() => []);
|
||||
setSearchResults(results);
|
||||
} else {
|
||||
setSearchResults([]);
|
||||
@@ -45,7 +45,7 @@ export default function SearchScreen() {
|
||||
}
|
||||
|
||||
async function fetchSearchResults(query: string): Promise<ItemData[]> {
|
||||
const results = await searchTitle(query);
|
||||
const results = await searchTitle(query)
|
||||
|
||||
return results
|
||||
.map((result) => {
|
||||
|
Reference in New Issue
Block a user