mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 15:09:10 +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
|
* check whether underlying data of runtime has changed
|
||||||
*/
|
*/
|
||||||
update(affectedIds?: string[]) {
|
update(affectedIds?: string[]) {
|
||||||
const hasLoadedElements = state.eventNow && state.eventNext;
|
const hasLoadedElements = state.eventNow || state.eventNext;
|
||||||
if (!hasLoadedElements) {
|
if (!hasLoadedElements) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ export const stateMutations = {
|
|||||||
|
|
||||||
// update data which is duplicate between eventNow and timer objects
|
// update data which is duplicate between eventNow and timer objects
|
||||||
state.timer.duration = calculateDuration(state.eventNow.timeStart, state.eventNow.timeEnd);
|
state.timer.duration = calculateDuration(state.eventNow.timeStart, state.eventNow.timeEnd);
|
||||||
|
state.timer.current = getCurrent(state);
|
||||||
state.timer.expectedFinish = getExpectedFinish(state);
|
state.timer.expectedFinish = getExpectedFinish(state);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user