Skip to content

Commit

Permalink
Don't access this.props in the ReusableBlockEdit constructor
Browse files Browse the repository at this point in the history
There's no need, as we're passed props as the constructor's first
argument.
  • Loading branch information
noisysocks committed Mar 12, 2018
1 parent c7e444f commit 5af814e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions blocks/library/block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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,
Expand Down

0 comments on commit 5af814e

Please sign in to comment.