We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69bd6cb commit 835a553Copy full SHA for 835a553
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