FIX: async ajax callback
This commit is contained in:
parent
fa338492a9
commit
e1099d14e7
|
@ -96,20 +96,18 @@ export default class AdminFlagItem extends Component {
|
|||
@action
|
||||
delete() {
|
||||
this.isSaved = false;
|
||||
return this.dialog.yesNoConfirm({
|
||||
this.dialog.yesNoConfirm({
|
||||
message: i18n("admin.config_areas.flags.delete_confirm", {
|
||||
name: this.args.flag.name,
|
||||
}),
|
||||
didConfirm: () => {
|
||||
this.args
|
||||
.deleteFlagCallback(this.args.flag)
|
||||
.then(() => {
|
||||
this.isSaved = true;
|
||||
this.dMenu.close();
|
||||
})
|
||||
.catch((error) => {
|
||||
popupAjaxError(error);
|
||||
});
|
||||
didConfirm: async () => {
|
||||
try {
|
||||
await this.args.deleteFlagCallback(this.args.flag);
|
||||
this.isSaved = true;
|
||||
this.dMenu.close();
|
||||
} catch (error) {
|
||||
popupAjaxError(error);
|
||||
}
|
||||
},
|
||||
didCancel: () => {
|
||||
this.isSaved = true;
|
||||
|
|
Loading…
Reference in New Issue