mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add prefer optional chaining rule
This commit is contained in:
parent
ec0adb895b
commit
f35a8151e0
61 changed files with 152 additions and 152 deletions
|
@ -65,7 +65,7 @@ class TabbedView {
|
|||
const previousIndex = e.detail.previousIndex;
|
||||
|
||||
const previousTabController = previousIndex == null ? null : self.tabControllers[previousIndex];
|
||||
if (previousTabController && previousTabController.onPause) {
|
||||
if (previousTabController?.onPause) {
|
||||
previousTabController.onPause();
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ class TabbedView {
|
|||
|
||||
if (!currentTabController) {
|
||||
mainTabsManager.selectedTabIndex(this.initialTabIndex);
|
||||
} else if (currentTabController && currentTabController.onResume) {
|
||||
} else if (currentTabController?.onResume) {
|
||||
currentTabController.onResume({});
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class TabbedView {
|
|||
onPause() {
|
||||
const currentTabController = this.currentTabController;
|
||||
|
||||
if (currentTabController && currentTabController.onPause) {
|
||||
if (currentTabController?.onPause) {
|
||||
currentTabController.onPause();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue