aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-11-15 15:16:41 +0100
committerChocobozzz <me@florianbigard.com>2022-11-15 15:16:41 +0100
commit7dcd7d81406f4869363d2a5595d5c68f7106eb22 (patch)
tree6da3b6fa6c58db11187cde99b66756ef621360b7 /client/src/standalone/videos/shared
parent99b757488c077cee7d0ab89eeec181a7ee6290eb (diff)
downloadPeerTube-7dcd7d81406f4869363d2a5595d5c68f7106eb22.tar.gz
PeerTube-7dcd7d81406f4869363d2a5595d5c68f7106eb22.tar.zst
PeerTube-7dcd7d81406f4869363d2a5595d5c68f7106eb22.zip
Fix client lint
Diffstat (limited to 'client/src/standalone/videos/shared')
-rw-r--r--client/src/standalone/videos/shared/playlist-tracker.ts6
1 files changed, 3 insertions, 3 deletions
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 {
32 32
33 const next = this.playlistElements.find(e => e.position === position) 33 const next = this.playlistElements.find(e => e.position === position)
34 34
35 if (!next || !next.video) { 35 if (!next?.video) {
36 return this.getNextPlaylistElement(position + 1) 36 return this.getNextPlaylistElement(position + 1)
37 } 37 }
38 38
@@ -52,7 +52,7 @@ export class PlaylistTracker {
52 52
53 const prev = this.playlistElements.find(e => e.position === position) 53 const prev = this.playlistElements.find(e => e.position === position)
54 54
55 if (!prev || !prev.video) { 55 if (!prev?.video) {
56 return this.getNextPlaylistElement(position - 1) 56 return this.getNextPlaylistElement(position - 1)
57 } 57 }
58 58
@@ -68,7 +68,7 @@ export class PlaylistTracker {
68 68
69 setPosition (position: number) { 69 setPosition (position: number) {
70 this.currentPlaylistElement = this.playlistElements.find(e => e.position === position) 70 this.currentPlaylistElement = this.playlistElements.find(e => e.position === position)
71 if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) { 71 if (!this.currentPlaylistElement?.video) {
72 logger.error('Current playlist element is not valid.', this.currentPlaylistElement) 72 logger.error('Current playlist element is not valid.', this.currentPlaylistElement)
73 this.currentPlaylistElement = this.getNextPlaylistElement() 73 this.currentPlaylistElement = this.getNextPlaylistElement()
74 } 74 }