mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Remove old test fix
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { StoreActionTypes } from './store.actions';
|
import { StoreActionTypes } from './store.actions';
|
||||||
import { initialMenusState } from './shared/menu/initial-menus-state';
|
|
||||||
|
|
||||||
// fallback ngrx debugger
|
// fallback ngrx debugger
|
||||||
let actionCounter = 0;
|
let actionCounter = 0;
|
||||||
@@ -19,14 +18,7 @@ export function universalMetaReducer(reducer) {
|
|||||||
return (state, action) => {
|
return (state, action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case StoreActionTypes.REHYDRATE:
|
case StoreActionTypes.REHYDRATE:
|
||||||
state = Object.assign({}, state, action.payload, {
|
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
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case StoreActionTypes.REPLAY:
|
case StoreActionTypes.REPLAY:
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user