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