aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone
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
parent99b757488c077cee7d0ab89eeec181a7ee6290eb (diff)
downloadPeerTube-7dcd7d81406f4869363d2a5595d5c68f7106eb22.tar.gz
PeerTube-7dcd7d81406f4869363d2a5595d5c68f7106eb22.tar.zst
PeerTube-7dcd7d81406f4869363d2a5595d5c68f7106eb22.zip
Fix client lint
Diffstat (limited to 'client/src/standalone')
-rw-r--r--client/src/standalone/videos/shared/playlist-tracker.ts6
-rw-r--r--client/src/standalone/videos/tsconfig.json4
2 files changed, 5 insertions, 5 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 }
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 @@
1{ 1{
2 "extends": "../../../tsconfig.json", 2 "extends": "../../../tsconfig.json",
3 "include": [ 3 "include": [
4 "src/standalone/videos/embed.ts", 4 "./embed.ts",
5 "src/standalone/videos/test-embed.ts" 5 "./test-embed.ts"
6 ] 6 ]
7} 7}