File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,9 @@ - (FIRApp *) firebaseApp
239
239
240
240
// if (!self.configured) {
241
241
242
- [FIRApp configureWithOptions: finalOptions];
242
+ if ([FIRApp defaultApp ] == NULL ) {
243
+ [FIRApp configureWithOptions: finalOptions];
244
+ }
243
245
[Firestack initializeFirestack: self ];
244
246
callback (@[[NSNull null ], props]);
245
247
}
Original file line number Diff line number Diff line change @@ -240,7 +240,11 @@ @implementation FirestackDatabase
240
240
RCT_EXPORT_METHOD (enablePersistence:(BOOL ) enable
241
241
callback:(RCTResponseSenderBlock) callback)
242
242
{
243
- [FIRDatabase database ].persistenceEnabled = enable;
243
+
244
+ BOOL isEnabled = [FIRDatabase database ].persistenceEnabled ;
245
+ if ( isEnabled != enable) {
246
+ [FIRDatabase database ].persistenceEnabled = enable;
247
+ }
244
248
callback (@[[NSNull null ], @{
245
249
@" result" : @" success"
246
250
}]);
You can’t perform that action at this time.
0 commit comments