Clean up unused code

This commit is contained in:
Toby Zerner 2016-03-28 15:46:52 +10:30
parent 7120ba2050
commit 76ea6f3695
2 changed files with 2 additions and 12 deletions

View File

@ -23063,12 +23063,7 @@ System.register('flarum/components/LogInModal', ['flarum/components/Modal', 'fla
key: 'onerror',
value: function onerror(error) {
if (error.status === 401) {
if (error.response.emailConfirmationRequired) {
error.alert.props.children = app.translator.trans('core.forum.log_in.confirmation_required_message', { email: error.response.emailConfirmationRequired });
delete error.alert.props.type;
} else {
error.alert.props.children = app.translator.trans('core.forum.log_in.invalid_login_message');
}
error.alert.props.children = app.translator.trans('core.forum.log_in.invalid_login_message');
}
babelHelpers.get(Object.getPrototypeOf(LogInModal.prototype), 'onerror', this).call(this, error);

View File

@ -130,12 +130,7 @@ export default class LogInModal extends Modal {
onerror(error) {
if (error.status === 401) {
if (error.response.emailConfirmationRequired) {
error.alert.props.children = app.translator.trans('core.forum.log_in.confirmation_required_message', {email: error.response.emailConfirmationRequired});
delete error.alert.props.type;
} else {
error.alert.props.children = app.translator.trans('core.forum.log_in.invalid_login_message');
}
error.alert.props.children = app.translator.trans('core.forum.log_in.invalid_login_message');
}
super.onerror(error);