fix: update timer on hot reload (#741)

This commit is contained in:
Carlos Valente
2024-01-27 22:54:03 +01:00
committed by GitHub
parent 32d70b3cd5
commit 5de40e8679
2 changed files with 2 additions and 1 deletions
@@ -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;
}
+1
View File
@@ -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;
}