Skip to content

Commit

Permalink
Update block-mover to use getBlockIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
notnownikki committed Jun 7, 2017
1 parent 378f441 commit 3cbbbb1
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 3cbbbb1

Please sign in to comment.