Skip to content

Commit

Permalink
fix: init the state on load new state
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewinci committed Sep 12, 2023
1 parent 00294be commit ecbdeda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/state/automerge-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,8 @@ export function loadNewState(remoteRawState: string, recreateState: boolean) {
if (recreateState) {
initAppState(remoteState.sessionId, remoteState.stage, remoteState.actions);
}
appState = Automerge.merge(appState, remoteState);
appState = Automerge.merge(
Automerge.init<AppState>({ patchCallback }),
remoteState
);
}

0 comments on commit ecbdeda

Please sign in to comment.