Skip to content

Commit

Permalink
Merge pull request #56 from khackskjs/bugfix/null-pointer-error
Browse files Browse the repository at this point in the history
Fix not to read property of null
  • Loading branch information
902seanryan authored Mar 9, 2022
2 parents 8394d8d + 77e2641 commit 6236f41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bellhop.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ export class Bellhop extends BellhopEventDispatcher {

// Be polite and respond to the child that we're ready
if (!this.isChild) {
// Timing issue: this.iframe.contentWindow is null when parent closes child iframe before done with rendering
if (!this.target) {
return;
}
this.target.postMessage(message, this.origin);
}

Expand Down

0 comments on commit 6236f41

Please sign in to comment.