Commit 43a570da authored by Amumu's avatar Amumu Committed by 偏右

For robustness

close #1661
parent 2465ac2c
......@@ -13,8 +13,8 @@ export default class GlobalHeader extends PureComponent {
this.triggerResizeEvent.cancel();
}
getNoticeData() {
const { notices = [] } = this.props;
if (notices.length === 0) {
const { notices} = this.props;
if (notices == null || notices.length === 0) {
return {};
}
const newNotices = notices.map(notice => {
......@@ -66,6 +66,9 @@ export default class GlobalHeader extends PureComponent {
onMenuClick,
onNoticeClear,
} = this.props;
if (currentUser == null) {
currentUser = {}
}
const menu = (
<Menu className={styles.menu} selectedKeys={[]} onClick={onMenuClick}>
<Menu.Item disabled>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment