mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57: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
|
|
@ -82,7 +82,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
}
|
||||
|
||||
el = eqs(event, 'a');
|
||||
if (el && el.matches('.selectable')) {
|
||||
if (el?.matches('.selectable')) {
|
||||
event.preventDefault();
|
||||
const folder = ko.dataFor(el);
|
||||
if (folder) {
|
||||
|
|
@ -170,10 +170,10 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
|
||||
AppUserStore.focusedState.subscribe(value => {
|
||||
let el = qs('li a.focused');
|
||||
el && el.classList.remove('focused');
|
||||
el?.classList.remove('focused');
|
||||
if (Scope.FolderList === value) {
|
||||
el = qs('li a.selected');
|
||||
el && el.classList.add('focused');
|
||||
el?.classList.add('focused');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue