From 87ca6734ac981b470fb31f9bc88f95d82366608f Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 9 Feb 2018 10:32:42 +0100 Subject: [PATCH] RichText: Optimize performance by using strict equality instead of isEqual --- blocks/rich-text/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/blocks/rich-text/index.js b/blocks/rich-text/index.js index c7e7478a08162..14e321babad00 100644 --- a/blocks/rich-text/index.js +++ b/blocks/rich-text/index.js @@ -691,14 +691,11 @@ export default class RichText extends Component { if ( this.props.tagName === prevProps.tagName && this.props.value !== prevProps.value && - this.props.value !== this.savedContent && - ! isEqual( this.props.value, prevProps.value ) && - ! isEqual( this.props.value, this.savedContent ) + this.props.value !== this.savedContent ) { this.updateContent(); } } - componentWillReceiveProps( nextProps ) { if ( 'development' === process.env.NODE_ENV ) { if ( ! isEqual( this.props.formatters, nextProps.formatters ) ) {