From e4b712593d55cc9491e29c612af4146fb50681a6 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Thu, 28 Oct 2021 17:47:03 +0200 Subject: [PATCH] fix: roll active with upcoming event fixed an bug where the next event index 0 was treated as no event found --- server/src/classes/EventTimer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/classes/EventTimer.js b/server/src/classes/EventTimer.js index 413848959..020872e53 100644 --- a/server/src/classes/EventTimer.js +++ b/server/src/classes/EventTimer.js @@ -988,16 +988,16 @@ export class EventTimer extends Timer { } // nothing to play next, unload - if (!foundNow && !nextIndex) { + if (foundNow == null && nextIndex == null) { this.unload(); return; } - if (nextIndex) { + if (nextIndex != null) { // load titles this._loadThisTitles(nextIndex, 'next'); - if (!foundNow) { + if (foundNow == null) { // timer counts to nextStart this.secondaryTimer = nextStart; }