diff --git a/src/common/reducers/links/index.js b/src/common/reducers/links/index.js index 8f50de21..378ad993 100644 --- a/src/common/reducers/links/index.js +++ b/src/common/reducers/links/index.js @@ -27,7 +27,7 @@ export function links (state: State = initialState, action): State { } } case GET_LINKS_FULFILLED: { - const entities = action.payload.data + const entities = action.payload return { ...state, entities, @@ -35,7 +35,7 @@ export function links (state: State = initialState, action): State { } } case GET_LINKS_REJECTED: { - const errors = action.payload.data + const errors = action.payload return { ...state, errors, diff --git a/src/common/reducers/links/index.test.js b/src/common/reducers/links/index.test.js index ac5122b7..09ebc970 100644 --- a/src/common/reducers/links/index.test.js +++ b/src/common/reducers/links/index.test.js @@ -28,9 +28,7 @@ describe('LINKS REDUCER', () => { const fail = { type: GET_LINKS_REJECTED, payload: { - errors: { - hmm: 'thatsanerror' - } + hmm: 'thatsanerror' } } expect(reducer(initialState, fail)).toEqual({ @@ -38,7 +36,7 @@ describe('LINKS REDUCER', () => { errors: { hmm: 'thatsanerror' }, - fetchStatus: 'loaded' + fetchStatus: 'error' }) })