fix the statement which is getting changed by Microbundle (#1156)
* fix the statement which is getting changed by microbundle * Create chatty-cherries-train.md * fix formatting. * fix position of comment --------- Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
5
.changeset/chatty-cherries-train.md
Normal file
5
.changeset/chatty-cherries-train.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'rrweb': patch
|
||||
---
|
||||
|
||||
Fix the statement which is getting changed by Microbundle
|
||||
@@ -94,8 +94,10 @@ function record<T = eventWithTime>(
|
||||
let passEmitsToParent = false;
|
||||
if (!inEmittingFrame) {
|
||||
try {
|
||||
window.parent.document; // throws if parent is cross-origin
|
||||
passEmitsToParent = false; // if parent is same origin we collect iframe events from the parent
|
||||
// throws if parent is cross-origin
|
||||
if (window.parent.document) {
|
||||
passEmitsToParent = false; // if parent is same origin we collect iframe events from the parent
|
||||
}
|
||||
} catch (e) {
|
||||
passEmitsToParent = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user