[ios] fix for #97

This commit is contained in:
Salakar 2017-05-09 17:20:06 +01:00
parent c8a3440fd4
commit 781f864692
1 changed files with 5 additions and 1 deletions

View File

@ -361,7 +361,11 @@ RCT_EXPORT_METHOD(enablePersistence:(BOOL) enable
BOOL isEnabled = [FIRDatabase database].persistenceEnabled;
if ( isEnabled != enable) {
[FIRDatabase database].persistenceEnabled = enable;
@try {
[FIRDatabase database].persistenceEnabled = enable;
} @catch (NSException *exception) {
// do nothing - for RN packager reloads
}
}
callback(@[[NSNull null], @{
@"result": @"success"