fix(preferences(js)): handle cancellation of IMAP account edition

This commit is contained in:
Francis Lachapelle committed 2020-06-22 17:31:54 -04:00
1 parent 7494bb3ae6
commit ee904ac616
2 files changed
+6 -2

No files matched your search

@@ -136,7 +136,8 @@
};
this.editMailAccount = function(event, index, form) {
var account = new Account(this.preferences.defaults.AuxiliaryMailAccounts[index]);
var data = _.cloneDeep(this.preferences.defaults.AuxiliaryMailAccounts[index]);
var account = new Account(data);
$mdDialog.show({
controller: 'AccountDialogController',
controllerAs: '$AccountDialogController',
@@ -151,7 +152,7 @@
}).then(function() {
vm.preferences.defaults.AuxiliaryMailAccounts[index] = account.$omit();
form.$setDirty();
});
}).catch(_.noop); // Cancel
};
this.removeMailAccount = function(index, form) {