From 5af814ea52a4fc78c8398f24cdec9e4883e1d457 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Mon, 12 Mar 2018 13:13:11 -0700 Subject: [PATCH] Don't access this.props in the ReusableBlockEdit constructor There's no need, as we're passed props as the constructor's first argument. --- blocks/library/block/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/blocks/library/block/index.js b/blocks/library/block/index.js index 5a27b017336e4..f5efbac918ae0 100644 --- a/blocks/library/block/index.js +++ b/blocks/library/block/index.js @@ -18,7 +18,7 @@ import BlockEdit from '../../block-edit'; import ReusableBlockEditPanel from './edit-panel'; class ReusableBlockEdit extends Component { - constructor() { + constructor( { reusableBlock } ) { super( ...arguments ); this.startEditing = this.startEditing.bind( this ); @@ -27,8 +27,6 @@ class ReusableBlockEdit extends Component { this.setTitle = this.setTitle.bind( this ); this.updateReusableBlock = this.updateReusableBlock.bind( this ); - const { reusableBlock } = this.props; - this.state = { isEditing: !! ( reusableBlock && reusableBlock.isTemporary ), title: null,