Skip to content

Commit

Permalink
Query Loop: Fix passing of namespace when selecting from suggested …
Browse files Browse the repository at this point in the history
…patterns (#63402)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Jul 11, 2024
1 parent f5907ee commit a4c1083
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/query/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ export const getTransformedBlocksFromPattern = (
) => {
const {
query: { postType, inherit },
namespace,
} = queryBlockAttributes;
const clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );
const queryClientIds = [];
Expand All @@ -225,6 +226,9 @@ export const getTransformedBlocksFromPattern = (
postType,
inherit,
};
if ( namespace ) {
block.attributes.namespace = namespace;
}
queryClientIds.push( block.clientId );
}
block.innerBlocks?.forEach( ( innerBlock ) => {
Expand Down

0 comments on commit a4c1083

Please sign in to comment.