merge recovered app state with default app state (makes a difference if the recovered app state is only partially defined)
This commit is contained in:
parent
9922f8588d
commit
e0863c9443
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ export function App() {
|
|||
if (recoveredState.editorState !== undefined) {
|
||||
const {editorState, ...appState} = recoveredState as AppState & {editorState: VisualEditorState};
|
||||
setEditHistory(() => ({current: editorState, history: [], future: []}));
|
||||
setAppState(() => appState);
|
||||
setAppState(defaultAppState => Object.assign({}, defaultAppState, appState));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export const defaultSideBarState = {
|
|||
showInputEvents: true,
|
||||
showInternalEvents: true,
|
||||
showOutputEvents: true,
|
||||
showPlant: false,
|
||||
showPlant: true,
|
||||
showConnections: false,
|
||||
showProperties: false,
|
||||
showExecutionTrace: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue