From 207ce90a51ef87c7655fde25c34e215425539957 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Thu, 5 Mar 2020 16:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7:=20increase=20code=20robustness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NoticeIcon/NoticeList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NoticeIcon/NoticeList.tsx b/src/components/NoticeIcon/NoticeList.tsx index f056b5b4..54e03543 100644 --- a/src/components/NoticeIcon/NoticeList.tsx +++ b/src/components/NoticeIcon/NoticeList.tsx @@ -34,7 +34,7 @@ const NoticeList: React.SFC = ({ viewMoreText, showViewMore = false, }) => { - if (data.length === 0) { + if (!data || data.length === 0) { return (