Skip to content

Commit d79ff4f

Browse files
authored
FIX: Pop up dialog correctly when fail to delete a user (#20645)
1 parent d7d3bc7 commit d79ff4f

File tree

1 file changed

+5
-1
lines changed
  • app/assets/javascripts/discourse/app/controllers/preferences

1 file changed

+5
-1
lines changed

app/assets/javascripts/discourse/app/controllers/preferences/account.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@ export default Controller.extend(CanCheckEmails, {
223223
});
224224
},
225225
() => {
226-
this.dialog.alert(I18n.t("user.delete_yourself_not_allowed"));
226+
next(() =>
227+
this.dialog.alert(
228+
I18n.t("user.delete_yourself_not_allowed")
229+
)
230+
);
227231
this.set("deleting", false);
228232
}
229233
);

0 commit comments

Comments
 (0)