mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added guard for missing contentDocument
no refs - in a rare edge case, its possible that `contentDocument` is not available due to component unmount, guards against erroring in such scenarios
This commit is contained in:
parent
87148b789c
commit
38202c1472
@ -15,10 +15,12 @@ export default class Frame extends Component {
|
||||
}
|
||||
|
||||
setupFrameBaseStyle() {
|
||||
this.iframeHtml = this.node.contentDocument.documentElement;
|
||||
this.iframeHead = this.node.contentDocument.head;
|
||||
this.iframeRoot = this.node.contentDocument.body;
|
||||
this.forceUpdate();
|
||||
if (this.node.contentDocument) {
|
||||
this.iframeHtml = this.node.contentDocument.documentElement;
|
||||
this.iframeHead = this.node.contentDocument.head;
|
||||
this.iframeRoot = this.node.contentDocument.body;
|
||||
this.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user