From 7dcd7d81406f4869363d2a5595d5c68f7106eb22 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Nov 2022 15:16:41 +0100 Subject: Fix client lint --- client/src/standalone/videos/shared/playlist-tracker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/standalone/videos/shared/playlist-tracker.ts') diff --git a/client/src/standalone/videos/shared/playlist-tracker.ts b/client/src/standalone/videos/shared/playlist-tracker.ts index 9ea4be83f..d8708826d 100644 --- a/client/src/standalone/videos/shared/playlist-tracker.ts +++ b/client/src/standalone/videos/shared/playlist-tracker.ts @@ -32,7 +32,7 @@ export class PlaylistTracker { const next = this.playlistElements.find(e => e.position === position) - if (!next || !next.video) { + if (!next?.video) { return this.getNextPlaylistElement(position + 1) } @@ -52,7 +52,7 @@ export class PlaylistTracker { const prev = this.playlistElements.find(e => e.position === position) - if (!prev || !prev.video) { + if (!prev?.video) { return this.getNextPlaylistElement(position - 1) } @@ -68,7 +68,7 @@ export class PlaylistTracker { setPosition (position: number) { this.currentPlaylistElement = this.playlistElements.find(e => e.position === position) - if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) { + if (!this.currentPlaylistElement?.video) { logger.error('Current playlist element is not valid.', this.currentPlaylistElement) this.currentPlaylistElement = this.getNextPlaylistElement() } -- cgit v1.2.3