Преглед на файлове

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