refactor: skip expected end if not playing

This commit is contained in:
Carlos Valente
2024-03-16 20:23:00 +01:00
committed by Carlos Valente
parent dd0dcfc2a2
commit 4fb9c42aef
+1 -1
View File
@@ -115,7 +115,7 @@ export function updateRundownData(playableRundown: OntimeEvent[]) {
runtimeState.runtime.plannedStart = firstEvent?.timeStart ?? null;
runtimeState.runtime.plannedEnd = lastEvent?.timeEnd ?? null;
if (runtimeState.runtime.plannedEnd === null) {
if (runtimeState.runtime.plannedEnd === null || !runtimeState.runtime.actualStart) {
runtimeState.runtime.expectedEnd = null;
} else {
runtimeState.runtime.expectedEnd = (runtimeState.runtime.plannedEnd + runtimeState.runtime.offset) % dayInMs;