Skip to content

Commit

Permalink
fix: reference remote document without accessing body
Browse files Browse the repository at this point in the history
Somehow document.body can be null even though we wait for the popup to be ready
  • Loading branch information
samuelmaddock committed Jul 7, 2020
1 parent 57efcc6 commit 15a6ba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metastream-app/src/components/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export class PopupWindow extends Component<Props, State> {
private renderRemote() {
if (!(PopupWindow.remoteWindowRef && this.state.remotePopupReady)) return

const remoteDocument = PopupWindow.remoteWindowRef.document.body.ownerDocument
const remoteDocument = PopupWindow.remoteWindowRef.document
const root = remoteDocument.getElementById('root')
if (!root) return

Expand Down

0 comments on commit 15a6ba7

Please sign in to comment.