@screeb/rrweb 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14695,9 +14695,13 @@ function v(t2) {
14695
14695
  return c2;
14696
14696
  }
14697
14697
  function discardPriorSnapshots(events, baselineTime) {
14698
+ let goFullSnapshot = false;
14698
14699
  for (let idx = events.length - 1; idx >= 0; idx--) {
14699
14700
  const event = events[idx];
14700
- if (event.type === EventType.Meta) {
14701
+ if (event.type === EventType.FullSnapshot) {
14702
+ goFullSnapshot = true;
14703
+ }
14704
+ if (event.type === EventType.Meta && goFullSnapshot) {
14701
14705
  if (event.timestamp <= baselineTime) {
14702
14706
  return events.slice(idx);
14703
14707
  }