From e7a5dda37e2b2530fb52035dd66f4f7a31a2e9d8 Mon Sep 17 00:00:00 2001 From: PrestonN Date: Thu, 30 May 2019 18:15:21 -0400 Subject: [PATCH] Fix Issue preventing navigation on certain videos. --- src/js/templates.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/templates.js b/src/js/templates.js index 54eceb471..2aece88a6 100644 --- a/src/js/templates.js +++ b/src/js/templates.js @@ -810,8 +810,10 @@ function hideViews() { let videoIndex = subscriptionView.videoList.findIndex(x => x.id === playerView.videoId); - subscriptionView.videoList[videoIndex].watched = true; - subscriptionView.videoList[videoIndex].progressPercentage = (lengthSeconds / duration) * 100; + if (videoIndex !== -1) { + subscriptionView.videoList[videoIndex].watched = true; + subscriptionView.videoList[videoIndex].progressPercentage = (lengthSeconds / duration) * 100; + } } subscriptionView.seen = false;