Skip to content

Commit

Permalink
Fix small bug when reaching the end of the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 7, 2018
1 parent 98e6026 commit 78891a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor/components/writing-flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ class WritingFlow extends Component {
* @param {DOMElement} target
*/
selectParentBlock( target ) {
if ( ! target ) {
return;
}

const parentBlock = target.hasAttribute( 'data-block' ) ? target : target.closest( '[data-block]' );
if (
parentBlock &&
Expand Down

0 comments on commit 78891a3

Please sign in to comment.