Return early for child same origin frames (#1295)
This commit is contained in:
5
.changeset/silent-plants-perform.md
Normal file
5
.changeset/silent-plants-perform.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'rrweb': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Return early for child same origin frames
|
||||||
@@ -122,6 +122,11 @@ function record<T = eventWithTime>(
|
|||||||
if (inEmittingFrame && !emit) {
|
if (inEmittingFrame && !emit) {
|
||||||
throw new Error('emit function is required');
|
throw new Error('emit function is required');
|
||||||
}
|
}
|
||||||
|
if (!inEmittingFrame && !passEmitsToParent) {
|
||||||
|
return () => {
|
||||||
|
/* no-op since in this case we don't need to record anything from this frame in particular */
|
||||||
|
};
|
||||||
|
}
|
||||||
// move departed options to new options
|
// move departed options to new options
|
||||||
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
|
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
|
||||||
sampling.mousemove = mousemoveWait;
|
sampling.mousemove = mousemoveWait;
|
||||||
|
|||||||
Reference in New Issue
Block a user