fix(auth): collection was mutated while being enumerated. (#2900)

This commit is contained in:
baspellis
2019-11-19 19:52:36 +01:00
committed by Mike Diarmid
parent 5c273d72b1
commit 5471187b30

View File

@@ -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 -