diff --git a/__tests__/src/reducers/manifests.test.js b/__tests__/src/reducers/manifests.test.js index 1f01025cf6a2a2e2425ff5ca9e83a56a06f0dcc7..31ce91188f7796d62f1607b3baa9c43ba09d716a 100644 --- a/__tests__/src/reducers/manifests.test.js +++ b/__tests__/src/reducers/manifests.test.js @@ -89,9 +89,9 @@ describe('manifests reducer', () => { }); }); it('should handle IMPORT_MIRADOR_STATE setting to clean state', () => { - expect(manifestsReducer({}, { + expect(manifestsReducer({ old: 'stuff' }, { state: { manifests: { new: 'stuff' } }, type: ActionTypes.IMPORT_MIRADOR_STATE, - })).toEqual({}); + })).toEqual({ new: 'stuff' }); }); }); diff --git a/src/state/reducers/manifests.js b/src/state/reducers/manifests.js index 3d56bbe58dc47795225ebcabed51b71ccab5545d..2fb36b4b36ddf49e061a364ef1657a8fcdf7181e 100644 --- a/src/state/reducers/manifests.js +++ b/src/state/reducers/manifests.js @@ -44,7 +44,7 @@ export const manifestsReducer = (state = {}, action) => { return object; }, {}); case ActionTypes.IMPORT_MIRADOR_STATE: - return {}; + return action.state.manifests || {}; default: return state; } };