@zaplier/sdk 1.3.5 → 1.3.6

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/index.cjs CHANGED
@@ -19068,19 +19068,18 @@ class SessionReplayEngine {
19068
19068
  this.hasFullSnapshot = false;
19069
19069
  this.startTime = Date.now();
19070
19070
  this.startBatchTimer();
19071
- // WORKAROUND: Force FullSnapshot creation to fix rrweb 2.0.0-alpha bug
19071
+ // WORKAROUND: Force FullSnapshot creation IMMEDIATELY to fix rrweb 2.0.0-alpha bug
19072
19072
  // where FullSnapshot is sometimes not created as the first event
19073
19073
  setTimeout(() => {
19074
- if (!this.hasFullSnapshot) {
19075
- console.warn("[Zaplier] ⚠️ FullSnapshot not created automatically, forcing manual capture...");
19076
- try {
19077
- takeFullSnapshot(true); // Force a new FullSnapshot
19078
- }
19079
- catch (error) {
19080
- console.error("[Zaplier] Failed to force FullSnapshot:", error);
19081
- }
19074
+ console.log("[Zaplier] Forcing immediate FullSnapshot to ensure correct event order...");
19075
+ try {
19076
+ takeFullSnapshot(true); // Force a new FullSnapshot immediately
19077
+ console.log("[Zaplier] FullSnapshot manually triggered");
19078
+ }
19079
+ catch (error) {
19080
+ console.error("[Zaplier] Failed to force FullSnapshot:", error);
19082
19081
  }
19083
- }, 500); // Give rrweb a chance to create natural FullSnapshot first
19082
+ }, 100); // Very short delay to ensure it comes first
19084
19083
  // Set timeout to check if FullSnapshot was captured
19085
19084
  this.snapshotTimeout = window.setTimeout(() => {
19086
19085
  if (!this.hasFullSnapshot) {