소스 검색

🔧: increase code robustness

chenshuai2144 6 년 전
부모
커밋
ebb9a48229
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.length === 0) {
+    if (!notices || notices.length === 0) {
       return {};
     }