Skip to content

Commit 99a255c

Browse files
Correct iOS option handling
1 parent cea040d commit 99a255c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ios/FirestorePlugin.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,14 @@ - (void)initialise:(CDVInvokedUrlCommand *)command {
296296

297297

298298
if (options[@"persist"] != NULL) {
299-
bool persist = [options valueForKey:@"persist"];
299+
bool persist = [[options valueForKey:@"persist"] boolValue];
300300

301301
[settings setPersistenceEnabled:persist];
302302
asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Setting Firestore persistance to true");
303303
}
304304

305305
if (options[@"timestampsInSnapshots"] != NULL) {
306-
bool timestampsInSnapshots = [options valueForKey:@"timestampsInSnapshots"];
306+
bool timestampsInSnapshots = [[options valueForKey:@"timestampsInSnapshots"] boolValue];
307307

308308
[settings setTimestampsInSnapshotsEnabled:timestampsInSnapshots];
309309
asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "Setting Firestore timestampsInSnapshots to true");

0 commit comments

Comments
 (0)