I added my block to an article and the new full site editing. The block renders an tag. When I select the block in the editor I click on the tag and I get a "Cannot destructure property 'frameElement' of 'r' as it is null." and reloads itself.
export default function Edit( { attributes, setAttributes } ) {
return (
<div { ...blockProps } >
<InspectorControls>
<Panel>
<PanelBody>
<PanelRow>
<MyFontSizePicker />
</PanelRow>
<PanelRow>
</PanelBody>
</Panel>
</InspectorControls>
<ServerSideRender
block="game-review/random-game"
attributes={ attributes }
/>
</div>
);
}
The callback does something like this:
function render_random_game(){
$link = '<a ' . $fontsizeattr . ' href="' . $url . '">' . $game_title . '</a>';
return "<p>" . $link . "</p>";
}
Any idea why this happens? Other blocks from my other plugins run fine. Here is the full source code for context: https://github.com/mtoensing/game-review-block/tree/main/blocks/random-game