From db5d67db219a6672848115b556fd572cdba7c60c Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 2 May 2023 15:14:18 +0700
Subject: fix product

---
 src/core/components/elements/Navbar/Search.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/core/components/elements/Navbar/Search.jsx')

diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx
index 54eecf84..77510773 100644
--- a/src/core/components/elements/Navbar/Search.jsx
+++ b/src/core/components/elements/Navbar/Search.jsx
@@ -13,7 +13,7 @@ const Search = () => {
   const loadSuggestion = useCallback(() => {
     if (query && document.activeElement == queryRef.current) {
       searchSuggestApi({ query }).then((response) => {
-        setSuggestions(response.data.suggestions)
+        setSuggestions(response.data?.suggestions || [])
       })
     } else {
       setSuggestions([])
-- 
cgit v1.2.3

