Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed lint errors in video-watch component
  • Loading branch information
Poslovitch committed Apr 17, 2021
commit f1ea475faee4e7cf97deeb4424c5a7378734cd7d
4 changes: 2 additions & 2 deletions client/src/app/+videos/+video-watch/video-watch.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
// Handle the ?playlistPosition
let position = queryParams[ 'playlistPosition' ]
Comment thread
Poslovitch marked this conversation as resolved.
Outdated
if (position === 'last') position = -1 // Handle the "last" index
if (typeof position === 'string') position = parseInt(position); // Sanitization needed for the "reverse" index
if (isNaN(position)) position = 1;
if (typeof position === 'string') position = parseInt(position, 10) // Sanitization needed for the "reverse" index
if (isNaN(position)) position = 1
Comment thread
Poslovitch marked this conversation as resolved.
Outdated

if (this.playlist && position < 0) this.playlistPosition = this.playlist.videosLength - position + 1
Comment thread
Poslovitch marked this conversation as resolved.
Outdated
else this.playlistPosition = position
Expand Down