Explorar o código

🔧: increase code robustness

chenshuai2144 %!s(int64=5) %!d(string=hai) anos
pai
achega
ebb9a48229
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {};
     }