Navigation Menu

Skip to content

Commit

Permalink
Clean up props destructuring in Categories block
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Aug 3, 2017
1 parent 515dad4 commit 30ba95e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blocks/library/categories/index.js
Expand Up @@ -57,22 +57,22 @@ registerBlockType( 'core/categories', {
}

toggleDisplayAsDropdown() {
const { displayAsDropdown } = this.props.attributes;
const { setAttributes } = this.props;
const { attributes, setAttributes } = this.props;
const { displayAsDropdown } = attributes;

setAttributes( { displayAsDropdown: ! displayAsDropdown } );
}

toggleShowPostCounts() {
const { showPostCounts } = this.props.attributes;
const { setAttributes } = this.props;
const { attributes, setAttributes } = this.props;
const { showPostCounts } = attributes;

setAttributes( { showPostCounts: ! showPostCounts } );
}

toggleShowHierarchy() {
const { showHierarchy } = this.props.attributes;
const { setAttributes } = this.props;
const { attributes, setAttributes } = this.props;
const { showHierarchy } = attributes;

setAttributes( { showHierarchy: ! showHierarchy } );
}
Expand Down

0 comments on commit 30ba95e

Please sign in to comment.