Merge pull request #3061 from matrix-org/dbkr/remove_unused_errortext_prop

Remove unused errorText prop
pull/21833/head
David Baker 2019-06-04 13:50:24 +01:00 committed by GitHub
commit 1618813652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -59,11 +59,6 @@ module.exports = React.createClass({
propTypes: {
onLoggedIn: PropTypes.func.isRequired,
// An error passed along from higher up explaining that something
// went wrong. May be replaced with a different error within the
// Login component.
errorText: PropTypes.string,
// If true, the component will consider itself busy.
busy: PropTypes.bool,
@ -141,7 +136,7 @@ module.exports = React.createClass({
},
hasError: function() {
return this.state.errorText || this.props.errorText;
return this.state.errorText;
},
onPasswordLogin: function(username, phoneCountry, phoneNumber, password) {
@ -515,7 +510,7 @@ module.exports = React.createClass({
const AuthBody = sdk.getComponent("auth.AuthBody");
const loader = this.isBusy() ? <div className="mx_Login_loader"><Loader /></div> : null;
const errorText = this.state.errorText || this.props.errorText;
const errorText = this.state.errorText;
let errorTextSection;
if (errorText) {