From ebb9a482294fc30196ffcc638ea73cde3d86950a Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Thu, 5 Mar 2020 16:28:39 +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/GlobalHeader/NoticeIconView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/GlobalHeader/NoticeIconView.tsx b/src/components/GlobalHeader/NoticeIconView.tsx index 6fbdd112..c7102d99 100644 --- a/src/components/GlobalHeader/NoticeIconView.tsx +++ b/src/components/GlobalHeader/NoticeIconView.tsx @@ -57,7 +57,7 @@ class GlobalHeaderRight extends Component { } => { const { notices = [] } = this.props; - if (notices.length === 0) { + if (!notices || notices.length === 0) { return {}; }