mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 18:33:53 +00:00
fix: issue where event next was stale
This commit is contained in:
committed by
Carlos Valente
parent
177c9a35ec
commit
fa709dc9be
@@ -232,7 +232,7 @@ class RuntimeService {
|
||||
|
||||
// we need to reload in a few scenarios:
|
||||
// 1. we are not confident that changes do not affect running event (eg. all events where changed)
|
||||
const safeOption = typeof affectedIds === 'undefined';
|
||||
const safeOption = affectedIds === undefined;
|
||||
// 2. the edited event is in memory (now or next) running
|
||||
// behind conditional to avoid doing unnecessary work
|
||||
const eventInMemory = safeOption ? false : this.affectsLoaded(affectedIds);
|
||||
|
||||
@@ -266,6 +266,9 @@ export function loadNext(
|
||||
return;
|
||||
}
|
||||
|
||||
// temporarily reset this value to simplify loop logic
|
||||
runtimeState.eventNext = null;
|
||||
|
||||
for (let i = eventIndex + 1; i < timedEvents.length; i++) {
|
||||
const event = timedEvents[i];
|
||||
// we dont deal with events that are not playable
|
||||
|
||||
Reference in New Issue
Block a user