aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index 107826824..1c510d6b0 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -189,11 +189,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
189 189
190 this.queryParamsSub = this.route.queryParams.subscribe(queryParams => { 190 this.queryParamsSub = this.route.queryParams.subscribe(queryParams => {
191 // Handle the ?playlistPosition 191 // Handle the ?playlistPosition
192 const positionParam = queryParams[ 'playlistPosition' ] 192 const positionParam = queryParams[ 'playlistPosition' ] ?? 1
193 193
194 this.playlistPosition = positionParam === 'last' 194 this.playlistPosition = positionParam === 'last'
195 ? -1 // Handle the "last" index 195 ? -1 // Handle the "last" index
196 : parseInt(positionParam, 10) 196 : parseInt(positionParam + '', 10)
197 197
198 if (isNaN(this.playlistPosition)) { 198 if (isNaN(this.playlistPosition)) {
199 console.error(`playlistPosition query param '${positionParam}' was parsed as NaN, defaulting to 1.`) 199 console.error(`playlistPosition query param '${positionParam}' was parsed as NaN, defaulting to 1.`)