Fix switching to template mode

When we switch to template mode RichTextButton, which is dependent
on mailpoetData fails to render. The panel is hidden but it is hidden
in a subsequent render so we need to add check if mailpoet data are available.
[MAILPOET-6354]
This commit is contained in:
Rostislav Wolny
2024-12-17 12:56:33 +01:00
committed by Aschepikov
parent 635ba35a52
commit 891bc34efa

View File

@@ -76,6 +76,10 @@ export function RichTextWithButton( {
</>
);
if ( ! mailpoetEmailData ) {
return null;
}
return (
<BaseControl
id={ `mailpoet-settings-panel__${ attributeName }` }