-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Describe the bug
When calling createBlock() with a block name that is not registered, a console error is fired due to blockType being undefined when accessing the .attributes property here
To reproduce
Steps to reproduce the behavior:
- Create a new Post or Page
- In the console panel call
wp.blocks.createBlock('not/registered) - See error in console.
Expected behavior
I would expect this function to fail with a console warning of Block type {name} is not registered.
Editor version (please complete the following information):
- WordPress version: 5.4.2
- No plugin installed.
Desktop (please complete the following information):
- OS: Mac OS 10.15.6
- Browser Chrome
- Version 84.0.4147.105
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
