Skip to content

Commit

Permalink
Don't use deprecated fn
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 17, 2023
1 parent 7d73069 commit 19bb9fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions docs/reference-guides/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,6 @@ _Returns_

Return the current block list.

_Parameters_

- _state_ `Object`:

_Returns_

- `Array`: Block list.
Expand Down
6 changes: 2 additions & 4 deletions packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,12 +1097,10 @@ export const isPublishSidebarEnabled = createRegistrySelector(
/**
* Return the current block list.
*
* @param {Object} state
* @return {Array} Block list.
*/
export const getEditorBlocks = createSelector(
() => getBlocks(),
() => [ getBlocks() ]
export const getEditorBlocks = createRegistrySelector(
( select ) => () => select( blockEditorStore ).getBlocks()
);

/**
Expand Down

0 comments on commit 19bb9fe

Please sign in to comment.