Skip to content

Commit 997d20f

Browse files
tylerwbellNightsd01
authored andcommitted
check for nil before creating alert dictionary (#410)
1 parent 51c60c1 commit 997d20f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ + (NSMutableDictionary*)formatApsPayloadIntoStandard:(NSDictionary*)remoteUserIn
376376
additionalData = nil;
377377
else if (remoteUserInfo[@"os_data"]) {
378378
[userInfo addEntriesFromDictionary:additionalData];
379-
if (!is2dot4Format)
379+
if (!is2dot4Format && userInfo[@"os_data"][@"buttons"])
380380
userInfo[@"aps"] = @{@"alert" : userInfo[@"os_data"][@"buttons"][@"m"]};
381381
}
382382

0 commit comments

Comments
 (0)