mirror of
https://github.com/cpvalente/ontime.git
synced 2026-07-26 10:38:55 +00:00
fix: update timer on hot reload (#741)
This commit is contained in:
@@ -93,7 +93,7 @@ class RuntimeService {
|
||||
* check whether underlying data of runtime has changed
|
||||
*/
|
||||
update(affectedIds?: string[]) {
|
||||
const hasLoadedElements = state.eventNow && state.eventNext;
|
||||
const hasLoadedElements = state.eventNow || state.eventNext;
|
||||
if (!hasLoadedElements) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -175,6 +175,7 @@ export const stateMutations = {
|
||||
|
||||
// update data which is duplicate between eventNow and timer objects
|
||||
state.timer.duration = calculateDuration(state.eventNow.timeStart, state.eventNow.timeEnd);
|
||||
state.timer.current = getCurrent(state);
|
||||
state.timer.expectedFinish = getExpectedFinish(state);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user