mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Use JavaScript Optional chaining
This commit is contained in:
parent
d9bc435e2c
commit
732b6eb641
55 changed files with 169 additions and 199 deletions
|
|
@ -131,7 +131,7 @@ computedPaginatorHelper = (koCurrentPage, koPageCount) => {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
mailToHelper = mailToUrl => {
|
||||
if (mailToUrl && 'mailto:' === mailToUrl.slice(0, 7).toLowerCase()) {
|
||||
if ('mailto:' === mailToUrl?.slice(0, 7).toLowerCase()) {
|
||||
mailToUrl = mailToUrl.slice(7).split('?');
|
||||
|
||||
const
|
||||
|
|
@ -181,7 +181,7 @@ setLayoutResizer = (source, target, sClientSideKeyName, mode) =>
|
|||
target.removeAttribute('style');
|
||||
source.removeAttribute('style');
|
||||
}
|
||||
source.observer && source.observer.disconnect();
|
||||
source.observer?.disconnect();
|
||||
// source.classList.toggle('resizable', mode);
|
||||
if (mode) {
|
||||
const length = Local.get(sClientSideKeyName + mode) || SettingsGet('Resizer' + sClientSideKeyName + mode),
|
||||
|
|
@ -248,7 +248,7 @@ setLayoutResizer = (source, target, sClientSideKeyName, mode) =>
|
|||
}
|
||||
source.layoutResizer.mode = mode;
|
||||
source.layoutResizer.key = sClientSideKeyName;
|
||||
source.observer && source.observer.observe(source, { box: 'border-box' });
|
||||
source.observer?.observe(source, { box: 'border-box' });
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ populateMessageBody = (oMessage, preload) => {
|
|||
oMessage = preload ? oMessage : null;
|
||||
let
|
||||
isNew = false,
|
||||
json = oData && oData.Result,
|
||||
json = oData?.Result,
|
||||
message = oMessage || MessageUserStore.message();
|
||||
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue