PreviewOptions: critical error when children not passed #54283
Labels
[Package] Block editor
/packages/block-editor
[Type] Bug
An existing feature does not function as intended
Description
It was also reported in:
The PreviewOptions component renders child components. However, because it assumes that the child is a function, a critical error will occur if the child is not passed in the proper form.
In the pattern directory, no children are passed, as only a device preview is sufficient.
Step-by-step reproduction instructions
To reproduce this issue, rewrite the Edit component of the code block as follows:
Screenshots, screen recording, code snippet
No response
Environment info
No response
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
The text was updated successfully, but these errors were encountered: