Skip to content

Commit 4afcfb1

Browse files
authored
Move to explicit nil check. (#782)
1 parent fd83e07 commit 4afcfb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Firebase/Core/FIROptions.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ - (BOOL)isMeasurementEnabled {
386386
return NO;
387387
}
388388
NSNumber *value = self.analyticsOptionsDictionary[kFIRIsMeasurementEnabled];
389-
if (!value) {
389+
if (value == nil) {
390390
return YES; // Enable Measurement by default when the key is not in the dictionary.
391391
}
392392
return [value boolValue];
@@ -397,15 +397,15 @@ - (BOOL)isAnalyticsCollectionEnabled {
397397
return NO;
398398
}
399399
NSNumber *value = self.analyticsOptionsDictionary[kFIRIsAnalyticsCollectionEnabled];
400-
if (!value) {
400+
if (value == nil) {
401401
return self.isMeasurementEnabled; // Fall back to older plist flag.
402402
}
403403
return [value boolValue];
404404
}
405405

406406
- (BOOL)isAnalyticsCollectionDeactivated {
407407
NSNumber *value = self.analyticsOptionsDictionary[kFIRIsAnalyticsCollectionDeactivated];
408-
if (!value) {
408+
if (value == nil) {
409409
return NO; // Analytics Collection is not deactivated when the key is not in the dictionary.
410410
}
411411
return [value boolValue];

0 commit comments

Comments
 (0)