Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
entities length > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-dasan committed Oct 10, 2018
1 parent a973759 commit f5b249e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/reducers/deploymentsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]] },
Expand Down

0 comments on commit f5b249e

Please sign in to comment.