Skip to content

Commit d42ecce

Browse files
committed
Fix exception when seeking to program end
1 parent 1e3453e commit d42ecce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controller/interstitials-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ export default class InterstitialsController
12351235
if (!schedule) {
12361236
return;
12371237
}
1238-
const scheduledItem = index >= 0 ? scheduleItems[index] : null;
1238+
const scheduledItem = scheduleItems[index] || null;
12391239
const media = this.primaryMedia;
12401240
// Cleanup out of range Interstitials
12411241
const playerQueue = this.playerQueue;
@@ -1354,7 +1354,7 @@ export default class InterstitialsController
13541354
if (this.shouldPlay) {
13551355
playWithCatch(player.media);
13561356
}
1357-
} else if (scheduledItem !== null) {
1357+
} else if (scheduledItem) {
13581358
this.resumePrimary(scheduledItem, index, currentItem);
13591359
if (this.shouldPlay) {
13601360
playWithCatch(this.hls.media);

0 commit comments

Comments
 (0)