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