Skip to content

Conversation

@aurooba
Copy link
Member

@aurooba aurooba commented Jun 3, 2025

What?

Small fix. The clientIds parameter of canInsertBlocks expects an array of strings, rather than just a string. Reference:

export function canInsertBlocks( state, clientIds, rootClientId = null ) {
return clientIds.every( ( id ) =>
canInsertBlockType( state, getBlockName( state, id ), rootClientId )
);
}

@github-actions
Copy link

github-actions bot commented Jun 3, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aurooba <aurooba@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@aurooba aurooba added the [Type] Developer Documentation Documentation for developers label Jun 3, 2025
@aurooba aurooba self-assigned this Jun 3, 2025
@aurooba aurooba requested a review from ellatrix as a code owner June 3, 2025 21:03
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

@t-hamano t-hamano added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Jun 4, 2025
@github-actions github-actions bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Jun 4, 2025
@t-hamano t-hamano added the [Package] Block editor /packages/block-editor label Jun 4, 2025
@t-hamano t-hamano merged commit 30778d0 into WordPress:trunk Jun 4, 2025
76 of 77 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.0 milestone Jun 4, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
* Fix parameter hint for `canInsertBlocks`

* ran `npm run docs:api-ref`

* adjust param in doc block and run docs command

Co-authored-by: aurooba <aurooba@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants