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