mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge branch 'dso-edit-menu-fixes' into w2p-94390_replace-dso-page-edit-buttons-with-a-menu
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user