mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
ChangeEmailModal: dismiss alert on new request
Removing old errors at the beginning of the next request, rather than at the end of the next successful request, makes it clearer that any new errors are caused by the new inputs. See https://github.com/flarum/core/pull/2467#issuecomment-749832787
This commit is contained in:
parent
99dee979a6
commit
1ede022dd8
|
@ -109,6 +109,7 @@ export default class ChangeEmailModal extends Modal {
|
|||
const oldEmail = app.session.user.email();
|
||||
|
||||
this.loading = true;
|
||||
this.alertAttrs = null;
|
||||
|
||||
app.session.user
|
||||
.save(
|
||||
|
@ -120,7 +121,6 @@ export default class ChangeEmailModal extends Modal {
|
|||
)
|
||||
.then(() => {
|
||||
this.success = true;
|
||||
this.alertAttrs = null;
|
||||
})
|
||||
.catch(() => {})
|
||||
.then(this.loaded.bind(this));
|
||||
|
|
Loading…
Reference in New Issue
Block a user