diff --git a/src/Bellhop.js b/src/Bellhop.js index ea06a05..f314813 100644 --- a/src/Bellhop.js +++ b/src/Bellhop.js @@ -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); }