Add static fallback link to old editor
[MAILPOET-2549]
This commit is contained in:
committed by
Jack Kitterhing
parent
a9f612d57f
commit
be0c9a726c
@ -16,14 +16,20 @@ const App = () => (
|
||||
);
|
||||
|
||||
const appElement = document.querySelector('#mailpoet_form_edit');
|
||||
const oldEditorLinkElement = document.querySelector('#mailpoet_form_edit_old_editor_fallback_link');
|
||||
|
||||
if (appElement) {
|
||||
initStore();
|
||||
initBlocks();
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
appElement
|
||||
);
|
||||
try {
|
||||
oldEditorLinkElement.style.display = 'none';
|
||||
initStore();
|
||||
initBlocks();
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
appElement
|
||||
);
|
||||
} catch (e) {
|
||||
oldEditorLinkElement.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user