From c0fea4821b034c85f6b52565b35f1cf0e80acb53 Mon Sep 17 00:00:00 2001 From: hovoodd Date: Sat, 20 Oct 2018 22:05:32 +0300 Subject: [PATCH] Add additional check for `usernameCanBeUpdated` condition in profile --- plugins/talk-plugin-local-auth/client/components/Profile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/talk-plugin-local-auth/client/components/Profile.js b/plugins/talk-plugin-local-auth/client/components/Profile.js index 139949b99..521128197 100644 --- a/plugins/talk-plugin-local-auth/client/components/Profile.js +++ b/plugins/talk-plugin-local-auth/client/components/Profile.js @@ -178,10 +178,12 @@ class Profile extends React.Component { }, }, notify, + success: hasChangedUsername, } = this.props; const { editing, formData, showDialog } = this.state; - const usernameCanBeUpdated = canUsernameBeUpdated(status); + const usernameCanBeUpdated = + canUsernameBeUpdated(status) && !hasChangedUsername; return (