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:
committed by
Aschepikov
parent
635ba35a52
commit
891bc34efa
@@ -76,6 +76,10 @@ export function RichTextWithButton( {
|
||||
</>
|
||||
);
|
||||
|
||||
if ( ! mailpoetEmailData ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<BaseControl
|
||||
id={ `mailpoet-settings-panel__${ attributeName }` }
|
||||
|
Reference in New Issue
Block a user