Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jan 29, 2024
1 parent 10406aa commit 7a98afa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,16 @@ export const getClientIdsOfDescendants = createSelector(
}
}

let index = 0;

// Add the descendants of the descendants, recursively.
for ( const id of ids ) {
while ( index < ids.length ) {
const id = ids[ index ];
const order = state.blocks.order.get( id );
if ( order ) {
ids.push( ...order );
ids.splice( index + 1, 0, ...order );
}
index++;
}

return ids;
Expand Down

0 comments on commit 7a98afa

Please sign in to comment.