Skip to content

Commit

Permalink
Setting content is no longer needed on split if state is in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Feb 13, 2018
1 parent 7f969f6 commit 1ec77c6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions blocks/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ export class RichText extends Component {
const beforeElement = nodeListToReact( beforeNodes, createTinyMCEElement );
const afterElement = nodeListToReact( afterNodes, createTinyMCEElement );

this.setContent( beforeElement );
this.props.onSplit( beforeElement, afterElement );
} else {
event.preventDefault();
Expand Down Expand Up @@ -606,10 +605,8 @@ export class RichText extends Component {
const beforeElement = nodeListToReact( beforeFragment.childNodes, createTinyMCEElement );
const afterElement = isLinkBoundary( afterFragment ) ? [] : nodeListToReact( afterFragment.childNodes, createTinyMCEElement );

this.setContent( beforeElement );
this.props.onSplit( beforeElement, afterElement, ...blocks );
} else {
this.setContent( [] );
this.props.onSplit( [], [], ...blocks );
}
}
Expand Down

0 comments on commit 1ec77c6

Please sign in to comment.