diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index 756c21c56b..0f75a661a2 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -160,9 +160,12 @@ function record( if (e.type === EventType.FullSnapshot) { lastFullSnapshotEvent = e; incrementalSnapshotCount = 0; - } else if (e.type === EventType.IncrementalSnapshot) { + } else if ( + [EventType.IncrementalSnapshot, EventType.Custom].includes(e.type) + ) { // attach iframe should be considered as full snapshot if ( + e.type === EventType.IncrementalSnapshot && e.data.source === IncrementalSource.Mutation && e.data.isAttachIframe ) {