From b005f2a465c799bb259320bdfe3386c000b07c63 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Sat, 4 Apr 2020 23:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20bug:=20more=20robust=20code=20ju?= =?UTF-8?q?dgment?= 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 3c10eb1d..825d3088 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 || notices.length === 0) { + if (!notices || notices.length === 0 || !Array.isArray(notices)) { return {}; } -- GitLab