mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Changed currentState update func to the not reset constants state
This commit is contained in:
parent
0e76205a88
commit
7a6068d7be
1 changed files with 8 additions and 1 deletions
|
|
@ -55,7 +55,14 @@ export const useCurrentStateStore = create(
|
|||
},
|
||||
setEditorReady: (isEditorReady) => set({ isEditorReady }),
|
||||
initializeCurrentStateOnVersionSwitch: () => {
|
||||
set({ ...initialState }, false, { type: 'INITIALIZE_CURRENT_STATE_ON_VERSION_SWITCH', initialState });
|
||||
const newInitialState = {
|
||||
...initialState,
|
||||
constants: get().constants,
|
||||
};
|
||||
set({ ...newInitialState }, false, {
|
||||
type: 'INITIALIZE_CURRENT_STATE_ON_VERSION_SWITCH',
|
||||
newInitialState,
|
||||
});
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue