Prevent showing add email address dialog when usernam is not set

This commit is contained in:
Chi Vinh Le
2018-05-11 18:38:41 +02:00
parent d67c25a791
commit f018ccf33e
@@ -19,6 +19,13 @@ const withData = withFragments({
me {
id
email
state {
status {
username {
status
}
}
}
}
settings {
requireEmailConfirmation
@@ -33,6 +40,7 @@ export default compose(
withData,
excludeIf(
({ root: { me }, inProgress }) =>
me.state.status.username.status === 'UNSET' ||
!((me && !me.email) || (me && me.email && inProgress))
)
)(AddEmailAddressDialog);