Fix typo in variable name (#26411)

This commit is contained in:
Iulian Onofrei
2018-11-14 00:16:47 +02:00
committed by Randell Dawson
parent fe00a8f959
commit 2ef81bde20

View File

@ -60,7 +60,7 @@ class UsernameSettings extends Component {
isFormPristine: true, isFormPristine: true,
formValue: props.username, formValue: props.username,
characterValidation: { valid: false, error: null }, characterValidation: { valid: false, error: null },
sumbitClicked: false submitClicked: false
}; };
this.handleChange = this.handleChange.bind(this); this.handleChange = this.handleChange.bind(this);
@ -77,7 +77,7 @@ class UsernameSettings extends Component {
/* eslint-disable-next-line react/no-did-update-set-state */ /* eslint-disable-next-line react/no-did-update-set-state */
return this.setState({ return this.setState({
isFormPristine: username === formValue, isFormPristine: username === formValue,
sumbitClicked: false submitClicked: false
}); });
} }
return null; return null;
@ -92,7 +92,7 @@ class UsernameSettings extends Component {
} = this.state; } = this.state;
return this.setState( return this.setState(
{ sumbitClicked: true }, { submitClicked: true },
() => (valid ? submitNewUsername(formValue) : null) () => (valid ? submitNewUsername(formValue) : null)
); );
} }
@ -166,7 +166,7 @@ class UsernameSettings extends Component {
isFormPristine, isFormPristine,
formValue, formValue,
characterValidation: { valid, error }, characterValidation: { valid, error },
sumbitClicked submitClicked
} = this.state; } = this.state;
const { isValidUsername, validating } = this.props; const { isValidUsername, validating } = this.props;
@ -190,7 +190,7 @@ class UsernameSettings extends Component {
<FullWidthRow> <FullWidthRow>
<BlockSaveButton <BlockSaveButton
disabled={ disabled={
!(isValidUsername && valid && !isFormPristine) || sumbitClicked !(isValidUsername && valid && !isFormPristine) || submitClicked
} }
/> />
</FullWidthRow> </FullWidthRow>