mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Sieve: use Optional chaining operator
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
This commit is contained in:
parent
3a1046f215
commit
e1426b484e
6 changed files with 12 additions and 13 deletions
|
|
@ -12,7 +12,7 @@ export const
|
|||
data = ko.observableArray(data);
|
||||
data.subscribe(changes =>
|
||||
changes.forEach(item =>
|
||||
'deleted' === item.status && null == item.moved && item.value.onDestroy && item.value.onDestroy()
|
||||
'deleted' === item.status && null == item.moved && item.value.onDestroy?.()
|
||||
)
|
||||
, data, 'arrayChange');
|
||||
return data;
|
||||
|
|
@ -22,7 +22,7 @@ export const
|
|||
koComputable = fn => ko.computed(fn, {'pure':true}),
|
||||
|
||||
arrayToString = (arr, separator) =>
|
||||
arr.map(item => item.toString ? item.toString() : item).join(separator),
|
||||
arr.map(item => item.toString?.() || item).join(separator),
|
||||
/*
|
||||
getNotificationMessage = code => {
|
||||
let key = getKeyByValue(Notification, code);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue