Skip to content

Commit

Permalink
Remove duplicate selectBlock dispatch
Browse files Browse the repository at this point in the history
- See REMOVE_BLOCKS effect in editor store's effect.js file. Final action when
removing blocks is to handle selection of the previous block
  • Loading branch information
talldan committed Aug 14, 2018
1 parent bcf5bdc commit b4c9018
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,8 @@ export class BlockListBlock extends Component {
case BACKSPACE:
case DELETE:
// Remove block on backspace.
const { clientId, onRemove, previousBlockClientId, onSelect } = this.props;
const { clientId, onRemove } = this.props;
onRemove( clientId );

if ( previousBlockClientId ) {
onSelect( previousBlockClientId, -1 );
}
event.preventDefault();
break;
}
Expand Down

0 comments on commit b4c9018

Please sign in to comment.