Skip to content

Commit 146ced2

Browse files
committed
Fix crash when an IAM click action does not have an id
1 parent 5a3f49f commit 146ced2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iOS_SDK/OneSignalSDK/Source/OSMessagingController.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,11 @@ - (void)sendClickRESTCall:(OSInAppMessageInternal *)message withAction:(OSInAppM
793793
// Handles body, button, or image clicks
794794
if (![self isClickAvailable:message withClickId:clickId])
795795
return;
796+
797+
if (!clickId) {
798+
[OneSignalLog onesignalLog:ONE_S_LL_ERROR message:@"sendClickRESTCall:withAction: call could not be made because the click action does not have an id."];
799+
return;
800+
}
796801
// Add clickId to clickedClickIds
797802
[self.clickedClickIds addObject:clickId];
798803
// Track clickId per IAM

0 commit comments

Comments
 (0)