Changes between Initial Version and Version 1 of Ticket #3735, comment 5
- Timestamp:
- 08/03/2018 04:33:34 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3735, comment 5
initial v1 6 6 >Probably a race condition with the initialization of the editor, which is slightly more involved https://github.com/WordPress/gutenberg/blob/9ae5aa223ef80c48f2352e4b90ffaefc37bc5258/lib/client-assets.php#L1292-L1298 7 7 >Instead of `wp.domReady`, it should probably be using `window._wpLoadGutenbergEditor.then` 8 9 Edit: To clarify, the race condition is that it is `initializeEditor` which registers the core set of blocks: 10 11 https://github.com/WordPress/gutenberg/blob/9ae5aa223ef80c48f2352e4b90ffaefc37bc5258/edit-post/index.js#L70 12 13 I suspect that what is happening is that the `wp.api.init` in Gutenberg's own initialization is slightly more delayed than the `wp.domReady` in the gutenberg frontend theme, so it's attempting to unregister the block before it's yet been registered.