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) {
|
if (recoveredState.editorState !== undefined) {
|
||||||
const {editorState, ...appState} = recoveredState as AppState & {editorState: VisualEditorState};
|
const {editorState, ...appState} = recoveredState as AppState & {editorState: VisualEditorState};
|
||||||
setEditHistory(() => ({current: editorState, history: [], future: []}));
|
setEditHistory(() => ({current: editorState, history: [], future: []}));
|
||||||
setAppState(() => appState);
|
setAppState(defaultAppState => Object.assign({}, defaultAppState, appState));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export const defaultSideBarState = {
|
||||||
showInputEvents: true,
|
showInputEvents: true,
|
||||||
showInternalEvents: true,
|
showInternalEvents: true,
|
||||||
showOutputEvents: true,
|
showOutputEvents: true,
|
||||||
showPlant: false,
|
showPlant: true,
|
||||||
showConnections: false,
|
showConnections: false,
|
||||||
showProperties: false,
|
showProperties: false,
|
||||||
showExecutionTrace: true,
|
showExecutionTrace: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue