Skip to content

Commit

Permalink
Make sure to properly compare empty text and undefined text variable …
Browse files Browse the repository at this point in the history
…before resetting the eventCount field. (#12815)
  • Loading branch information
daniloercoli authored Dec 12, 2018
1 parent 81843bd commit e72c26b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ export class RichText extends Component {

// If the component is changed React side (undo/redo/merging/splitting/custom text actions)
// we need to make sure the native is updated as well
if ( nextProps.value &&
this.lastContent &&
if ( ( typeof nextProps.value !== 'undefined' ) &&
( typeof this.lastContent !== 'undefined' ) &&
nextProps.value !== this.lastContent ) {
this.lastEventCount = undefined; // force a refresh on the native side
}
Expand Down

0 comments on commit e72c26b

Please sign in to comment.