From 0cca8225002979a910508b037526e8c5f862f1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 4 Oct 2018 10:38:24 -0400 Subject: [PATCH] Fix selector import --- packages/editor/src/components/block-drop-zone/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/components/block-drop-zone/index.js b/packages/editor/src/components/block-drop-zone/index.js index 8ad164eb5421f..ded228febbe32 100644 --- a/packages/editor/src/components/block-drop-zone/index.js +++ b/packages/editor/src/components/block-drop-zone/index.js @@ -77,7 +77,7 @@ class BlockDropZone extends Component { } onDrop( event, position ) { - const { rootClientId: dstRootClientId, clientId: dstClientId, index: dstIndex, getDescendants } = this.props; + const { rootClientId: dstRootClientId, clientId: dstClientId, index: dstIndex, getClientIdsOfDescendants } = this.props; const { srcRootClientId, srcClientId, srcIndex, type } = parseDropEvent( event ); const isBlockDropType = ( dropType ) => dropType === 'block'; @@ -87,7 +87,7 @@ class BlockDropZone extends Component { return ( srcRoot === dstRoot ) || ( ! srcRoot === true && ! dstRoot === true ); }; const isSameBlock = ( src, dst ) => src === dst; - const isSrcBlockAnAncestorOfDstBlock = ( src, dst ) => getDescendants( [ src ] ).some( ( id ) => id === dst ); + const isSrcBlockAnAncestorOfDstBlock = ( src, dst ) => getClientIdsOfDescendants( [ src ] ).some( ( id ) => id === dst ); if ( ! isBlockDropType( type ) || isSameBlock( srcClientId, dstClientId ) || @@ -156,10 +156,10 @@ export default compose( }; } ), withSelect( ( select, { rootClientId } ) => { - const { getDescendants, getTemplateLock } = select( 'core/editor' ); + const { getClientIdsOfDescendants, getTemplateLock } = select( 'core/editor' ); return { isLocked: !! getTemplateLock( rootClientId ), - getDescendants, + getClientIdsOfDescendants, }; } ) )( BlockDropZone );