[Resolved]Logout while being under the Profile page throws exception. (#73)

This commit is contained in:
Qolzam
2018-07-10 18:00:16 +07:00
parent 037f333642
commit 930de94d1f
4 changed files with 7 additions and 6 deletions

View File

@@ -392,8 +392,8 @@ const mapStateToProps = (state: Map<string, any>, ownProps: ICommentGroupCompone
translate: getTranslate(state.get('locale')),
commentsRequestStatus : commentsRequestStatus ? commentsRequestStatus.status : ServerRequestStatusType.NoAction,
commentSlides,
avatar: user.avatar || '',
fullName: user.fullName || '',
avatar: user ? user.avatar : '',
fullName: user ? user.fullName : '',
userInfo: state.getIn(['user', 'info'])
}

View File

@@ -270,8 +270,8 @@ const mapStateToProps = (state: Map<string,any>, ownProps: IHomeHeaderComponentP
const user = state.getIn(['user', 'info', uid], {})
return {
translate: getTranslate(state.get('locale')),
avatar: user.avatar || '',
fullName: user.fullName || '',
avatar: user ? user.avatar : '',
fullName: user ? user.fullName : '',
title: state.getIn(['global', 'headerTitle'], ''),
notifyCount
}

View File

@@ -288,6 +288,7 @@ export class HomeComponent extends Component<IHomeComponentProps, IHomeComponent
[classes[`contentShift-${anchor}`]]: drawerOpen,
})}
>
<HR enabled={loaded!} data={{ mergedPosts, loadDataStream, hasMorePosts }} />
</main>
</div>

View File

@@ -289,8 +289,8 @@ const uid = state.getIn(['authorize', 'uid'])
const user = state.getIn(['user', 'info', uid])
return {
translate: getTranslate(state.get('locale')),
avatar: user.avatar || '',
fullName: user.fullName || ''
avatar: user ? user.avatar : '',
fullName: user ? user.fullName : ''
}
}