Skip to content
Snippets Groups Projects
Commit 967d5b3d authored by Chris Beer's avatar Chris Beer
Browse files

Import manifests from state, if provided

parent 6b5b864b
No related branches found
No related tags found
No related merge requests found
......@@ -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' });
});
});
......@@ -44,7 +44,7 @@ export const manifestsReducer = (state = {}, action) => {
return object;
}, {});
case ActionTypes.IMPORT_MIRADOR_STATE:
return {};
return action.state.manifests || {};
default: return state;
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment