@tagadapay/plugin-sdk 2.4.25 → 2.4.26

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.
@@ -413,7 +413,19 @@ localConfig, blockUntilSessionReady = false, // Default to new non-blocking beha
413
413
  }
414
414
  };
415
415
  void initializeToken();
416
- }, [storeId, createAnonymousToken, initializeSession, configLoading]);
416
+ }, [storeId, createAnonymousToken, initializeSession, configLoading, isInitializing]);
417
+ useEffect(() => {
418
+ function checkCMSToken() {
419
+ const token = getClientToken();
420
+ if (token) {
421
+ isInitializing.current = false;
422
+ }
423
+ }
424
+ window.addEventListener('storage', checkCMSToken);
425
+ return () => {
426
+ window.removeEventListener('storage', checkCMSToken);
427
+ };
428
+ }, []);
417
429
  // Update auth state when customer/session changes
418
430
  useEffect(() => {
419
431
  setAuth({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagadapay/plugin-sdk",
3
- "version": "2.4.25",
3
+ "version": "2.4.26",
4
4
  "description": "Modern React SDK for building Tagada Pay plugins",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",