Skip to content

Commit

Permalink
Inserter: Rename block to blockType for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jul 24, 2017
1 parent 393c6d9 commit 729391b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions editor/inserter/menu.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { flow, groupBy, sortBy, findIndex, filter, debounce } from 'lodash';
import { flow, groupBy, sortBy, findIndex, filter, debounce, find } from 'lodash';
import { connect } from 'react-redux';

/**
Expand Down Expand Up @@ -63,8 +63,8 @@ class InserterMenu extends Component {
}
}

isDisabledBlock( block ) {
return block.useOnce && find( this.props.blocks, ( { name } ) => block.name === name );
isDisabledBlock( blockType ) {
return blockType.useOnce && find( this.props.blocks, ( { name } ) => blockType.name === name );
}

bindReferenceNode( nodeName ) {
Expand Down Expand Up @@ -152,12 +152,12 @@ class InserterMenu extends Component {
}

// Return the name of the next block type.
const block = blockTypes[ nextIndex ];
if ( this.isDisabledBlock( block ) ) {
const blockType = blockTypes[ nextIndex ];
if ( this.isDisabledBlock( blockType ) ) {
return this.findByIncrement( blockTypes, increment > 0 ? increment + 1 : increment - 1 );
}

return block.name;
return blockType.name;
}

findNext( blockTypes ) {
Expand Down

0 comments on commit 729391b

Please sign in to comment.