@devskin/browser-sdk 1.0.53 → 1.0.54

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.
@@ -14368,25 +14368,25 @@ function DevSkin(command, ...args) {
14368
14368
  }
14369
14369
  }
14370
14370
  // Process queued commands from async loader
14371
- if (typeof window !== 'undefined' && window.DevSkin) {
14371
+ if (typeof window !== 'undefined') {
14372
14372
  const stub = window.DevSkin;
14373
- if (stub.q && Array.isArray(stub.q)) {
14374
- // Process all queued commands
14375
- stub.q.forEach((args) => {
14373
+ const queue = stub === null || stub === void 0 ? void 0 : stub.q;
14374
+ // Replace stub FIRST so any new calls go directly to the real SDK
14375
+ Object.assign(DevSkin, sdk);
14376
+ window.DevSkin = DevSkin;
14377
+ // Preserve load time
14378
+ if (stub === null || stub === void 0 ? void 0 : stub.l) {
14379
+ DevSkin.l = stub.l;
14380
+ }
14381
+ // THEN process queued commands (including any that arrived during SDK load)
14382
+ if (queue && Array.isArray(queue)) {
14383
+ queue.forEach((args) => {
14376
14384
  if (args.length > 0) {
14377
14385
  DevSkin(args[0], ...args.slice(1));
14378
14386
  }
14379
14387
  });
14380
14388
  }
14381
- // Preserve load time
14382
- if (stub.l) {
14383
- DevSkin.l = stub.l;
14384
- }
14385
- // Replace stub with real function
14386
- window.DevSkin = DevSkin;
14387
14389
  }
14388
- // For UMD/global access, also expose singleton methods directly
14389
- Object.assign(DevSkin, sdk);
14390
14390
 
14391
14391
  export { sdk as default };
14392
14392
  //# sourceMappingURL=devskin.esm.js.map