Explorar o código

🔧: increase code robustness

chenshuai2144 %!s(int64=6) %!d(string=hai) anos
pai
achega
207ce90a51
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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