From 2ad72a667d9281023145e2cd5b7dae930e3d07fe Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 3 Dec 2023 11:00:24 +0800 Subject: [PATCH] In case they're undefined --- src/pages/search.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/search.jsx b/src/pages/search.jsx index 7c4587cb..e86f0850 100644 --- a/src/pages/search.jsx +++ b/src/pages/search.jsx @@ -113,9 +113,9 @@ function Search(props) { setShowMore(!!length); } } else { - setStatusResults(results.statuses); - setAccountResults(results.accounts); - setHashtagResults(results.hashtags); + setStatusResults(results.statuses || []); + setAccountResults(results.accounts || []); + setHashtagResults(results.hashtags || []); offsetRef.current = 0; setShowMore(false); }