Skip to content

A platform for community discussion. Free, open, simple.

FIX: Pop up dialog correctly when fail to delete a user (#20645)

PangBod79ff4f810a0
diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/account.js b/app/assets/javascripts/discourse/app/controllers/preferences/account.js
index da2c5a7cf6c..6a567b93805 100644
--- a/app/assets/javascripts/discourse/app/controllers/preferences/account.js
+++ b/app/assets/javascripts/discourse/app/controllers/preferences/account.js
@@ -223,7 +223,11 @@ export default Controller.extend(CanCheckEmails, {
});
},
() => {
- this.dialog.alert(I18n.t("user.delete_yourself_not_allowed"));
+ next(() =>
+ this.dialog.alert(
+ I18n.t("user.delete_yourself_not_allowed")
+ )
+ );
this.set("deleting", false);
}
);