When using get_block_wrapper_attributes()
inside a block template, the first time the block gets rendered in the preview, it throws an error:
> Trying to access array offset on value of type null
This is because WP_Block_Supports doesn’t have an initialized block.
This is a quick patch fix but probably the whole thing should be refactored to use native WP render methods no?
https://gist.github.com/oxyc/dc646e094e1096972f17422052e87a6b