-
Bug
-
Resolution: Merged
-
Should have
-
None
-
3
-
Blocks (all)
We use the has_block function to conditionally enqueue front end scripts for some of our blocks, which allows us to avoid serving the script if no block on the page needs it.
However this function doesn't work as expected in preview mode, which caused these blocks to not be displayed. The function seems to look for the block in the published version of the post, and not in the preview.
We fixed this by always serving all split scripts in preview mode.