浏览代码

🐛 bug: more robust code judgment

chenshuai2144 6 年之前
父节点
当前提交
b005f2a465
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/GlobalHeader/NoticeIconView.tsx

+ 1 - 1
src/components/GlobalHeader/NoticeIconView.tsx

@@ -57,7 +57,7 @@ class GlobalHeaderRight extends Component<GlobalHeaderRightProps> {
   } => {
     const { notices = [] } = this.props;
 
-    if (!notices || notices.length === 0) {
+    if (!notices || notices.length === 0 || !Array.isArray(notices)) {
       return {};
     }