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 +++--- client/src/standalone/videos/tsconfig.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/standalone') 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() } diff --git a/client/src/standalone/videos/tsconfig.json b/client/src/standalone/videos/tsconfig.json index e0cab7ca3..7d532985c 100644 --- a/client/src/standalone/videos/tsconfig.json +++ b/client/src/standalone/videos/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../../tsconfig.json", "include": [ - "src/standalone/videos/embed.ts", - "src/standalone/videos/test-embed.ts" + "./embed.ts", + "./test-embed.ts" ] } -- cgit v1.2.3