tuyetnhi 1 year ago
parent
commit
2fb19f1a33
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/common/AutoCompleteSearch.tsx

+ 1 - 1
src/components/common/AutoCompleteSearch.tsx

@@ -18,7 +18,7 @@ export default function AutoCompleteSearch({
   return (
   return (
     <div className={cx("complete_box", !show ? "hidden" : "")}>
     <div className={cx("complete_box", !show ? "hidden" : "")}>
       <div className={cx("complete_list")}>
       <div className={cx("complete_list")}>
-        {data.map((item, index) => {
+        {data?.map((item, index) => {
           return (
           return (
             <div className={cx("complete_item")} key={index} onClick={() => onClick(item)}>
             <div className={cx("complete_item")} key={index} onClick={() => onClick(item)}>
               <span className={cx("complete_text")}>{item}</span>
               <span className={cx("complete_text")}>{item}</span>