Skip to content

Commit

Permalink
Fix for nil check.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Dec 21, 2023
1 parent be01fb3 commit 8381e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/ARTLocalDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ + (instancetype)deviceWithStorage:(id<ARTDeviceStorage>)storage logger:(nullable
#endif
device.push.recipient[@"transportType"] = ARTDevicePushTransportType;

NSString *deviceId = [storage objectForKey:ARTDeviceIdKey] ?: @""; // PCD2, not nullable
NSString *deviceId = [storage objectForKey:ARTDeviceIdKey];
NSString *deviceSecret = deviceId == nil ? nil : [storage secretForDevice:deviceId];

device.id = deviceId;
device.id = deviceId ?: @""; // PCD2, not nullable;
device.secret = deviceSecret;

id identityTokenDetailsInfo = [storage objectForKey:ARTDeviceIdentityTokenKey];
Expand Down

0 comments on commit 8381e10

Please sign in to comment.