@zaplier/sdk 1.4.0 → 1.4.1

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.
package/dist/sdk.js CHANGED
@@ -19044,8 +19044,16 @@
19044
19044
  // Simple rrweb recording configuration like official example
19045
19045
  this.rrwebStopRecord = record({
19046
19046
  emit: (event) => {
19047
- // Simple event capture - no processing
19047
+ // CRITICAL: Ensure FullSnapshot is always first event
19048
+ if (this.events.length === 0 && event.type !== 2) {
19049
+ console.warn(`[Zaplier] First event is type ${event.type}, not FullSnapshot (2). Skipping until FullSnapshot.`);
19050
+ return; // Skip non-FullSnapshot events if no FullSnapshot captured yet
19051
+ }
19052
+ // Simple event capture
19048
19053
  this.events.push(event);
19054
+ if (event.type === 2) {
19055
+ console.log(`[Zaplier] ✅ FullSnapshot captured as event #${this.events.length}`);
19056
+ }
19049
19057
  },
19050
19058
  });
19051
19059
  this.isActive = true;