We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5e0d522 + 835a553 commit 97c3b35Copy full SHA for 97c3b35
client/modules/IDE/components/PreviewFrame.jsx
@@ -64,7 +64,8 @@ class PreviewFrame extends React.Component {
64
65
componentWillUnmount() {
66
window.removeEventListener('message', this.handleConsoleEvent);
67
- ReactDOM.unmountComponentAtNode(this.iframeElement.contentDocument.body);
+ const iframeBody = this.iframeElement.contentDocument.body;
68
+ if (iframeBody) { ReactDOM.unmountComponentAtNode(iframeBody); }
69
}
70
71
handleConsoleEvent(messageEvent) {
0 commit comments