Skip to content

Conversation

matux
Copy link
Contributor

@matux matux commented Oct 2, 2025

Description of the change

checkoutEveryNms defaults to 10 when maxSeconds is 0, inconsistent with rrweb’s expected behavior:

https://github.com/rrweb-io/rrweb/blob/76df9799ecc14930fa914e5623a73ea7726e3747/packages/rrweb/src/record/index.ts#L247-L252
    wrappedEmit = (r: eventWithoutTime, isCheckout?: boolean) => {
      ...
      const exceedTime =
        checkoutEveryNms &&
        e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
      if (exceedCount || exceedTime) {
        takeFullSnapshot(true);
      }
    }

Where a checkoutEveryNms of 0 means a single initial full snapshot, and continuous event emission with no checkouts.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

@matux matux requested a review from waltjones October 2, 2025 14:46
@matux matux self-assigned this Oct 2, 2025
@matux matux force-pushed the matux/checkoutnms branch from 1e4eb6a to 1574af5 Compare October 2, 2025 17:26
@matux matux force-pushed the matux/checkoutnms branch from 1574af5 to 1d60e0d Compare October 2, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant