mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 21:45:32 +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
1851d1678e
commit
00913d5b0b
|
@ -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