mirror of
https://github.com/wassname/talk.git
synced 2026-07-29 11:28:24 +08:00
Use lodash get
This commit is contained in:
@@ -5,6 +5,7 @@ import AddEmailAddressDialog from '../components/AddEmailAddressDialog';
|
||||
import { notify } from 'coral-framework/actions/notification';
|
||||
import { withAttachLocalAuth } from '../hocs';
|
||||
import { startAttach, finishAttach } from '../actions';
|
||||
import get from 'lodash/get';
|
||||
|
||||
const mapStateToProps = ({ talkPluginLocalAuth: state }) => ({
|
||||
inProgress: state.inProgress,
|
||||
@@ -41,7 +42,7 @@ export default compose(
|
||||
excludeIf(
|
||||
({ root: { me }, inProgress }) =>
|
||||
!me ||
|
||||
me.state.status.username.status === 'UNSET' ||
|
||||
get(me, 'state.status.username.status') === 'UNSET' ||
|
||||
(me.email && !inProgress)
|
||||
)
|
||||
)(AddEmailAddressDialog);
|
||||
|
||||
Reference in New Issue
Block a user