mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Fixed preview not working when no sponsors are found.
This commit is contained in:
@@ -379,11 +379,14 @@ function sponsorsLookup(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updatePreviewBar() {
|
function updatePreviewBar() {
|
||||||
let allSponsorTimes = sponsorTimes.concat(sponsorTimesSubmitting);
|
let localSponsorTimes = sponsorTimes;
|
||||||
|
if (localSponsorTimes == null) localSponsorTimes = [];
|
||||||
|
|
||||||
|
let allSponsorTimes = localSponsorTimes.concat(sponsorTimesSubmitting);
|
||||||
|
|
||||||
//create an array of the sponsor types
|
//create an array of the sponsor types
|
||||||
let types = [];
|
let types = [];
|
||||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
for (let i = 0; i < localSponsorTimes.length; i++) {
|
||||||
types.push("sponsor");
|
types.push("sponsor");
|
||||||
}
|
}
|
||||||
for (let i = 0; i < sponsorTimesSubmitting.length; i++) {
|
for (let i = 0; i < sponsorTimesSubmitting.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user