From 80040c650e8a43a776da185c8ae21fde23662497 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Mon, 25 Feb 2019 19:35:26 +0100 Subject: [PATCH 1/2] Fix selector in document outline. --- packages/editor/src/components/document-outline/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/document-outline/index.js b/packages/editor/src/components/document-outline/index.js index 63349419e43b69..15d220ca11c68d 100644 --- a/packages/editor/src/components/document-outline/index.js +++ b/packages/editor/src/components/document-outline/index.js @@ -142,7 +142,7 @@ export const DocumentOutline = ( { blocks = [], title, onSelect, isTitleSupporte export default compose( withSelect( ( select ) => { - const { getEditedPostAttribute, getBlocks } = select( 'core/block-editor' ); + const { getEditedPostAttribute, getBlocks } = select( 'core/editor' ); const { getPostType } = select( 'core' ); const postType = getPostType( getEditedPostAttribute( 'type' ) ); From 0cc21653615fdeca33bae1768722e27e2ac5c7a8 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Mon, 25 Feb 2019 19:47:46 +0100 Subject: [PATCH 2/2] Import getBlocks from its new location. --- packages/editor/src/components/document-outline/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/document-outline/index.js b/packages/editor/src/components/document-outline/index.js index 15d220ca11c68d..b73af4a92d0874 100644 --- a/packages/editor/src/components/document-outline/index.js +++ b/packages/editor/src/components/document-outline/index.js @@ -142,7 +142,8 @@ export const DocumentOutline = ( { blocks = [], title, onSelect, isTitleSupporte export default compose( withSelect( ( select ) => { - const { getEditedPostAttribute, getBlocks } = select( 'core/editor' ); + const { getBlocks } = select( 'core/block-editor' ); + const { getEditedPostAttribute } = select( 'core/editor' ); const { getPostType } = select( 'core' ); const postType = getPostType( getEditedPostAttribute( 'type' ) );