We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fd8bc7 commit 2fad234Copy full SHA for 2fad234
webroot/js/inject-iframe.js
@@ -96,7 +96,11 @@ if (elem) {
96
type: this.getResponseHeader('Content-Type'),
97
};
98
99
- iframe.contentWindow.postMessage(`ajax-completed$$${JSON.stringify(params)}`, window.location.origin);
+ if (iframe && iframe.contentWindow) {
100
+ iframe.contentWindow.postMessage(`ajax-completed$$${JSON.stringify(params)}`, window.location.origin);
101
+ } else {
102
+ console.warn('DebugKit: Unable to send ajax completion message - iframe not available');
103
+ }
104
}
105
if (original) {
106
return original.apply(this, [].slice.call(arguments));
0 commit comments