[ios] fix for #97
This commit is contained in:
parent
c8a3440fd4
commit
781f864692
@ -361,7 +361,11 @@ RCT_EXPORT_METHOD(enablePersistence:(BOOL) enable
|
|||||||
|
|
||||||
BOOL isEnabled = [FIRDatabase database].persistenceEnabled;
|
BOOL isEnabled = [FIRDatabase database].persistenceEnabled;
|
||||||
if ( isEnabled != enable) {
|
if ( isEnabled != enable) {
|
||||||
[FIRDatabase database].persistenceEnabled = enable;
|
@try {
|
||||||
|
[FIRDatabase database].persistenceEnabled = enable;
|
||||||
|
} @catch (NSException *exception) {
|
||||||
|
// do nothing - for RN packager reloads
|
||||||
|
}
|
||||||
}
|
}
|
||||||
callback(@[[NSNull null], @{
|
callback(@[[NSNull null], @{
|
||||||
@"result": @"success"
|
@"result": @"success"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user