Skip to content

Commit

Permalink
Merge pull request #1066 from WordPress/fix/block-mover-rename-getblo…
Browse files Browse the repository at this point in the history
…ckorder

Update block-mover to use getBlockIndex
  • Loading branch information
notnownikki authored Jun 7, 2017
2 parents 378f441 + 3cbbbb1 commit 89115b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/block-mover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getBlockType } from 'blocks';
* Internal dependencies
*/
import './style.scss';
import { isFirstBlock, isLastBlock, getBlockOrder, getBlock } from '../selectors';
import { isFirstBlock, isLastBlock, getBlockIndex, getBlock } from '../selectors';
import { getBlockMoverLabel } from './mover-label';

function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, firstIndex } ) {
Expand Down Expand Up @@ -60,7 +60,7 @@ export default connect(
( state, ownProps ) => ( {
isFirst: isFirstBlock( state, first( ownProps.uids ) ),
isLast: isLastBlock( state, last( ownProps.uids ) ),
firstIndex: getBlockOrder( state, first( ownProps.uids ) ),
firstIndex: getBlockIndex( state, first( ownProps.uids ) ),
blockType: getBlockType( getBlock( state, first( ownProps.uids ) ).name ),
} ),
( dispatch, ownProps ) => ( {
Expand Down

0 comments on commit 89115b2

Please sign in to comment.