mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Fixed error when preview bar updates
This commit is contained in:
@@ -824,7 +824,8 @@ function updatePreviewBar() {
|
|||||||
types.push("preview-" + sponsorTimesSubmitting[i].category);
|
types.push("preview-" + sponsorTimesSubmitting[i].category);
|
||||||
}
|
}
|
||||||
|
|
||||||
utils.wait(() => previewBar !== null).then((result) => previewBar.set(utils.getSegmentsFromSponsorTimes(allSponsorTimes), types, video.duration));
|
utils.wait(() => previewBar !== null && video !== null)
|
||||||
|
.then((result) => previewBar.set(utils.getSegmentsFromSponsorTimes(allSponsorTimes), types, video.duration));
|
||||||
|
|
||||||
//update last video id
|
//update last video id
|
||||||
lastPreviewBarUpdate = sponsorVideoID;
|
lastPreviewBarUpdate = sponsorVideoID;
|
||||||
|
|||||||
Reference in New Issue
Block a user