mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-28 20:25:41 +08:00
fix(auth): collection was mutated while being enumerated. (#2900)
This commit is contained in:
@@ -80,14 +80,14 @@ RCT_EXPORT_MODULE();
|
||||
FIRApp *firebaseApp = [RCTConvert firAppFromString:key];
|
||||
|
||||
[[FIRAuth authWithApp:firebaseApp] removeAuthStateDidChangeListener:[authStateHandlers valueForKey:key]];
|
||||
[authStateHandlers removeObjectForKey:key];
|
||||
}
|
||||
[authStateHandlers removeAllObjects];
|
||||
|
||||
for (NSString *key in idTokenHandlers) {
|
||||
FIRApp *firebaseApp = [RCTConvert firAppFromString:key];
|
||||
[[FIRAuth authWithApp:firebaseApp] removeIDTokenDidChangeListener:[idTokenHandlers valueForKey:key]];
|
||||
[idTokenHandlers removeObjectForKey:key];
|
||||
}
|
||||
[idTokenHandlers removeAllObjects];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user