JavaScript for WordPress Forums Gutenberg Development Block alignment breaks block when set and then saved unset

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #80587
    cameronjonesweb
    Participant

    In 04.05 block alignment, if you set the block alignment, unset the block alignment, save the post and then reload the editor, the block will be broken and display This block has encountered an error and cannot be previewed.

    This is the markup the block has:

    
    <!-- wp:jsforwpblocks/block-alignment-toolbar {"className":"alignundefined"} -->
    <div class="wp-block-jsforwpblocks-block-alignment-toolbar alignundefined message-body"><p>testiung testing 123</p></div>
    <!-- /wp:jsforwpblocks/block-alignment-toolbar -->
    

    I expect all it needs is the align class in the save method being wrapped in a conditional statement

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.