Skip to content

Commit

Permalink
chore: Remove duplicate switch cases in packages/block-editor/src/sto…
Browse files Browse the repository at this point in the history
…re/reducer.js (#16563)
  • Loading branch information
jorgefilipecosta authored Jul 12, 2019
1 parent 8c77742 commit 69bc538
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions packages/block-editor/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ export const blocks = flow(
return getFlattenedBlocksWithoutAttributes( action.blocks );

case 'RECEIVE_BLOCKS':
case 'INSERT_BLOCKS':
return {
...state,
...getFlattenedBlocksWithoutAttributes( action.blocks ),
Expand All @@ -612,12 +613,6 @@ export const blocks = flow(
},
};

case 'INSERT_BLOCKS':
return {
...state,
...getFlattenedBlocksWithoutAttributes( action.blocks ),
};

case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
if ( ! action.blocks ) {
return state;
Expand All @@ -641,6 +636,7 @@ export const blocks = flow(
return getFlattenedBlockAttributes( action.blocks );

case 'RECEIVE_BLOCKS':
case 'INSERT_BLOCKS':
return {
...state,
...getFlattenedBlockAttributes( action.blocks ),
Expand Down Expand Up @@ -688,12 +684,6 @@ export const blocks = flow(
[ action.clientId ]: nextAttributes,
};

case 'INSERT_BLOCKS':
return {
...state,
...getFlattenedBlockAttributes( action.blocks ),
};

case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
if ( ! action.blocks ) {
return state;
Expand Down

0 comments on commit 69bc538

Please sign in to comment.