diff options
author | Ryan Wilson <wilsonryan@google.com> | 2018-02-12 14:52:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-12 14:52:19 -0500 |
commit | 4afcfb1b11a9ab2cd3ae4ee212093cce845a5978 (patch) | |
tree | 2281c043cdd2ab548d7d7292daec66f6e1ec3008 | |
parent | fd83e078a271ceddd0a04c4e4880b4ce1ef34ce5 (diff) |
Move to explicit nil check. (#782)
-rw-r--r-- | Firebase/Core/FIROptions.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m index 2e490b6..a5d3b71 100644 --- a/Firebase/Core/FIROptions.m +++ b/Firebase/Core/FIROptions.m @@ -386,7 +386,7 @@ static NSDictionary *sDefaultOptionsDictionary = nil; return NO; } NSNumber *value = self.analyticsOptionsDictionary[kFIRIsMeasurementEnabled]; - if (!value) { + if (value == nil) { return YES; // Enable Measurement by default when the key is not in the dictionary. } return [value boolValue]; @@ -397,7 +397,7 @@ static NSDictionary *sDefaultOptionsDictionary = nil; return NO; } NSNumber *value = self.analyticsOptionsDictionary[kFIRIsAnalyticsCollectionEnabled]; - if (!value) { + if (value == nil) { return self.isMeasurementEnabled; // Fall back to older plist flag. } return [value boolValue]; @@ -405,7 +405,7 @@ static NSDictionary *sDefaultOptionsDictionary = nil; - (BOOL)isAnalyticsCollectionDeactivated { NSNumber *value = self.analyticsOptionsDictionary[kFIRIsAnalyticsCollectionDeactivated]; - if (!value) { + if (value == nil) { return NO; // Analytics Collection is not deactivated when the key is not in the dictionary. } return [value boolValue]; |