@umituz/react-native-auth 4.3.67 → 4.3.69
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-auth",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.69",
|
|
4
4
|
"description": "Authentication service for React Native apps - Secure, type-safe, and production-ready. Provider-agnostic design with dependency injection, configurable validation, and comprehensive error handling.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -68,11 +68,15 @@ class AuthEventService {
|
|
|
68
68
|
|
|
69
69
|
// Return cleanup function
|
|
70
70
|
return () => {
|
|
71
|
-
|
|
71
|
+
// Re-fetch eventListeners to ensure we have the current array
|
|
72
|
+
const currentListeners = this.listeners.get(event);
|
|
73
|
+
if (!currentListeners) return;
|
|
74
|
+
|
|
75
|
+
const index = currentListeners.indexOf(listener);
|
|
72
76
|
if (index > -1) {
|
|
73
|
-
|
|
77
|
+
currentListeners.splice(index, 1);
|
|
74
78
|
// Clean up empty arrays to prevent memory leaks
|
|
75
|
-
if (
|
|
79
|
+
if (currentListeners.length === 0) {
|
|
76
80
|
this.listeners.delete(event);
|
|
77
81
|
}
|
|
78
82
|
}
|