Skip to content

Commit

Permalink
fix(preferences(js)): prohibit deleting the last editable mail identity
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed May 25, 2022
1 parent 5452cd7 commit 9337915
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -53,7 +53,7 @@
});

this.hasIdentities = function () {
return _.filter(this.account.identities, vm.isEditableIdentity).length > 0;
return _.filter(this.account.identities, this.isEditableIdentity).length > 0;
};

this.isEditableIdentity = function (identity) {
Expand Down Expand Up @@ -84,7 +84,7 @@
};

this.canRemoveIdentity = function (index) {
return (index == this.selectedIdentity) && (this.account.identities.length > 1);
return (index == this.selectedIdentity) && this.hasIdentities();
};

this.removeIdentity = function (index) {
Expand Down

0 comments on commit 9337915

Please sign in to comment.