Skip to content

Commit

Permalink
Use new selector to get all sections
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Sep 4, 2024
1 parent d099668 commit 45487c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,5 +565,5 @@ export function getSectionRootClientId( state ) {
*/
export function getSectionClientIds( state ) {
const sectionRootClientId = getSectionRootClientId( state );
return getBlockOrder( sectionRootClientId );
return getBlockOrder( state, sectionRootClientId );
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export default function ContentOnlyLockSections() {

const selected = useSelect( ( select ) => {
const {
getBlockOrder,
getClientIdsOfDescendants,
getClientIdsWithDescendants,
getSectionRootClientId,
getSectionClientIds,
} = unlock( select( blockEditorStore ) );

const sectionRootClientId = getSectionRootClientId();
const sectionClientIds = getBlockOrder( sectionRootClientId );
const sectionClientIds = getSectionClientIds();
const allClientIds = sectionRootClientId
? getClientIdsOfDescendants( sectionRootClientId )
: getClientIdsWithDescendants();
Expand Down

0 comments on commit 45487c0

Please sign in to comment.