diff --git a/frontend/src/_stores/currentStateStore.js b/frontend/src/_stores/currentStateStore.js index c111f77311..98201873f2 100644 --- a/frontend/src/_stores/currentStateStore.js +++ b/frontend/src/_stores/currentStateStore.js @@ -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, + }); }, }, }),