@umituz/react-native-subscription 2.37.90 → 2.37.91

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.37.90",
3
+ "version": "2.37.91",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -74,6 +74,15 @@ export async function startBackgroundInitialization(config: SubscriptionInitConf
74
74
  }
75
75
 
76
76
  debounceTimer = setTimeout(async () => {
77
+ // Don't initialize when there's no user and no previous user.
78
+ // This is the initial signed-out state before auth resolves, not a logout.
79
+ if (!revenueCatUserId && !lastUserId) {
80
+ if (typeof __DEV__ !== 'undefined' && __DEV__) {
81
+ console.log('[BackgroundInitializer] No user and no previous user, waiting for auth');
82
+ }
83
+ return;
84
+ }
85
+
77
86
  if (typeof __DEV__ !== 'undefined' && __DEV__) {
78
87
  console.log('[BackgroundInitializer] Auth state listener triggered, reinitializing with userId:', revenueCatUserId || '(undefined - anonymous)');
79
88
  }