From f5b249e4ff2b8236fb6eca8c909b72899d6807cd Mon Sep 17 00:00:00 2001 From: Isaac Date: Wed, 10 Oct 2018 16:56:54 -0700 Subject: [PATCH] entities length > 0 --- src/store/reducers/deploymentsReducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/reducers/deploymentsReducer.js b/src/store/reducers/deploymentsReducer.js index fdb27d6ed..697f8b911 100644 --- a/src/store/reducers/deploymentsReducer.js +++ b/src/store/reducers/deploymentsReducer.js @@ -95,7 +95,7 @@ const initialState = { ...errorPendingInitialState, entities: {} }; const insertDeploymentReducer = (state, { payload, fromAction }) => { const { entities: { deployments }, result } = normalize({ ...payload, isNew: true }, deploymentSchema); - if (state.entities) { + if (state.entities && state.entities.length > 0) { return update(state, { entities: { deployments: { $merge: deployments } }, items: { $splice: [[0, 0, result]] },