mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Use JavaScript Optional chaining
This commit is contained in:
parent
d9bc435e2c
commit
732b6eb641
55 changed files with 169 additions and 199 deletions
|
|
@ -30,7 +30,7 @@ export class UserSettingsAccounts /*extends AbstractViewSettings*/ {
|
|||
}
|
||||
|
||||
editAccount(account) {
|
||||
if (account && account.isAdditional()) {
|
||||
if (account?.isAdditional()) {
|
||||
showScreenPopup(AccountPopupView, [account]);
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ export class UserSettingsAccounts /*extends AbstractViewSettings*/ {
|
|||
* @returns {void}
|
||||
*/
|
||||
deleteAccount(accountToRemove) {
|
||||
if (accountToRemove && accountToRemove.askDelete()) {
|
||||
if (accountToRemove?.askDelete()) {
|
||||
this.accountForDeletion(null);
|
||||
if (accountToRemove) {
|
||||
this.accounts.remove((account) => accountToRemove === account);
|
||||
|
|
@ -72,7 +72,7 @@ export class UserSettingsAccounts /*extends AbstractViewSettings*/ {
|
|||
* @returns {void}
|
||||
*/
|
||||
deleteIdentity(identityToRemove) {
|
||||
if (identityToRemove && identityToRemove.askDelete()) {
|
||||
if (identityToRemove?.askDelete()) {
|
||||
this.identityForDeletion(null);
|
||||
|
||||
if (identityToRemove) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue