Selaa lähdekoodia

🔧: increase code robustness

chenshuai2144 5 vuotta sitten
vanhempi
commit
207ce90a51
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/components/NoticeIcon/NoticeList.tsx

+ 1 - 1
src/components/NoticeIcon/NoticeList.tsx

@@ -34,7 +34,7 @@ const NoticeList: React.SFC<NoticeIconTabProps> = ({
   viewMoreText,
   showViewMore = false,
 }) => {
-  if (data.length === 0) {
+  if (!data || data.length === 0) {
     return (
       <div className={styles.notFound}>
         <img