diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/ConfirmChangesDialog.js b/plugins/talk-plugin-auth/client/profile-settings/components/ConfirmChangesDialog.js index d3f5ee60d..a69a869ab 100644 --- a/plugins/talk-plugin-auth/client/profile-settings/components/ConfirmChangesDialog.js +++ b/plugins/talk-plugin-auth/client/profile-settings/components/ConfirmChangesDialog.js @@ -35,6 +35,10 @@ class ConfirmChangesDialog extends React.Component { }; render() { + const totalSteps = React.Children.count(this.props.children); + + if (!totalSteps) return null; + return ( { const { newUsername } = this.state.formData; - const { setUsername } = this.props; + const { changeUsername } = this.props; try { - await setUsername(newUsername); + await changeUsername(newUsername); this.props.notify( 'success', t('talk-plugin-auth.change_username.changed_username_success_msg') @@ -266,7 +266,7 @@ Profile.propTypes = { updateEmailAddress: PropTypes.func.isRequired, changeUsername: PropTypes.func.isRequired, root: PropTypes.object.isRequired, - setUsername: PropTypes.func.isRequired, + changeUsername: PropTypes.func.isRequired, notify: PropTypes.func.isRequired, username: PropTypes.string, emailAddress: PropTypes.string,