diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index 70137aefa53d..3f5ebeca14aa 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -161,7 +161,10 @@ class ProfilePage extends Component { } validateInputs() { - const [hasFirstNameError, hasLastNameError, hasPronounError] = ValidationUtils.doesFailCharacterLimit(50, [this.state.firstName, this.state.lastName, this.state.pronouns]); + const [hasFirstNameError, hasLastNameError, hasPronounError] = ValidationUtils.doesFailCharacterLimit( + 50, + [this.state.firstName.trim(), this.state.lastName.trim(), this.state.pronouns.trim()], + ); this.setState({ hasFirstNameError, hasLastNameError, @@ -177,7 +180,7 @@ class ProfilePage extends Component { })); // Determines if the pronouns/selected pronouns have changed - const arePronounsUnchanged = this.props.myPersonalDetails.pronouns === this.state.pronouns; + const arePronounsUnchanged = this.props.myPersonalDetails.pronouns === this.state.pronouns.trim(); // Disables button if none of the form values have changed const isButtonDisabled = (this.props.myPersonalDetails.firstName === this.state.firstName.trim())