Skip to content

Commit

Permalink
Ensure there's a selection before resetting it
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Aug 9, 2019
1 parent 0206166 commit 9886d9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class BlockEditorProvider extends Component {
this.isSyncingOutcomingValue = null;
this.isSyncingIncomingValue = value;
resetBlocks( value );
resetSelection( selectionStart, selectionEnd );

if ( selectionStart && selectionEnd ) {
resetSelection( selectionStart, selectionEnd );
}
}
}

Expand Down

0 comments on commit 9886d9f

Please sign in to comment.