فهرست منبع

🔧: 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 {};
     }