Merge branch 'dso-edit-menu-fixes' into w2p-94390_replace-dso-page-edit-buttons-with-a-menu

This commit is contained in:
Yana De Pauw
2022-12-07 09:48:58 +01:00

View File

@@ -1,5 +1,4 @@
import { StoreActionTypes } from './store.actions';
import { initialMenusState } from './shared/menu/initial-menus-state';
// fallback ngrx debugger
let actionCounter = 0;
@@ -19,14 +18,7 @@ export function universalMetaReducer(reducer) {
return (state, action) => {
switch (action.type) {
case StoreActionTypes.REHYDRATE:
state = Object.assign({}, state, action.payload, {
/**
* Reset menus after the store is rehydrated, in order to force them to be recreated client side.
* The reason is that menu options stored on the server may contain methods that don't survive the
* (de)serialization to/from JSON
*/
menus: initialMenusState
});
state = Object.assign({}, state, action.payload);
break;
case StoreActionTypes.REPLAY:
default: