close
Skip to content

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

@albanyacademy

Description

@albanyacademy

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

Metadata

Metadata

Assignees

Labels

Backwards CompatibilityIssues or PRs that impact backwards compatability[Package] Block editor/packages/block-editor[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions