Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chatty-cherries-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

Fix the statement which is getting changed by Microbundle
6 changes: 4 additions & 2 deletions packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down