Skip to content

Commit 7e5ba60

Browse files
authored
Fix static analysis warning in Core. (#2034)
Explicitly check for `nil` instead of using the `!` operator on the pointer.
1 parent 07362ec commit 7e5ba60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Firebase/Core/FIRApp.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ + (void)configure {
106106
// Read the Info.plist to see if the flag is set. At this point we can't check any user defaults
107107
// since the app isn't configured at all, so only rely on the Info.plist value.
108108
NSNumber *collectionEnabledPlistValue = [[self class] readDataCollectionSwitchFromPlist];
109-
if (!collectionEnabledPlistValue || [collectionEnabledPlistValue boolValue]) {
109+
if (collectionEnabledPlistValue == nil || [collectionEnabledPlistValue boolValue]) {
110110
[[NSNotificationCenter defaultCenter]
111111
postNotificationName:kFIRAppDiagnosticsNotification
112112
object:nil

0 commit comments

Comments
 (0)