Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__experimentalUseHasRecursion deprecation is attempting to spread a non-iterable variable #60437

Closed
albanyacademy opened this issue Apr 3, 2024 · 2 comments · Fixed by #60451
Assignees
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@albanyacademy
Copy link

albanyacademy commented Apr 3, 2024

Description

export function useHasRecursion( uniqueId, blockName = '' ) {

__experimentalUseHasRecursion accepted a string argument (above), the deprecation instead tries to spread a props object (below)

Step-by-step reproduction instructions

make a block that uses __experimentalUseHasRecursion in Wordpress 6.4.3 and in 6.5.

observe that it works with a unique id as the sole argument in 6.4.3, and that it errors in 6.5 with this message in console appearing: TypeError: e is not iterable

Screenshots, screen recording, code snippet

No response

Environment info

wordpress 6.5

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@albanyacademy albanyacademy added the [Type] Bug An existing feature does not function as intended label Apr 3, 2024
@t-hamano t-hamano added Backwards Compatibility Issues or PRs that impact backwards compatability [Package] Block editor /packages/block-editor labels Apr 4, 2024
@talldan talldan self-assigned this Apr 4, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Apr 4, 2024
@talldan
Copy link
Contributor

talldan commented Apr 4, 2024

Thanks for reporting @albanyacademy. I've put together a fix, which should land in the next minor WordPress release.

@albanyacademy
Copy link
Author

no worries, i absolutely wasn't using an experimental feature in a production environment by the way, nope no way just happened to notice it somehow for completely different reasons 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants