소스 검색

🔧: increase code robustness

chenshuai2144 6 년 전
부모
커밋
207ce90a51
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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