fix: roll active with upcoming event

fixed an bug where the next event index 0 was treated as no event found
This commit is contained in:
cv
2021-10-28 17:47:03 +02:00
parent 1305fad6b5
commit e4b712593d
+3 -3
View File
@@ -988,16 +988,16 @@ export class EventTimer extends Timer {
} }
// nothing to play next, unload // nothing to play next, unload
if (!foundNow && !nextIndex) { if (foundNow == null && nextIndex == null) {
this.unload(); this.unload();
return; return;
} }
if (nextIndex) { if (nextIndex != null) {
// load titles // load titles
this._loadThisTitles(nextIndex, 'next'); this._loadThisTitles(nextIndex, 'next');
if (!foundNow) { if (foundNow == null) {
// timer counts to nextStart // timer counts to nextStart
this.secondaryTimer = nextStart; this.secondaryTimer = nextStart;
} }