Skip to content

Commit

Permalink
- Fixes wzrk_c2a value passed as null when nil is passed as callToAct…
Browse files Browse the repository at this point in the history
…ion value in webView message handler.
  • Loading branch information
nishant-clevertap committed Nov 18, 2024
1 parent c386c6a commit 2c8163d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CleverTapSDK/CTInAppDisplayViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,12 @@ - (void)triggerInAppAction:(CTNotificationAction *)action callToAction:(NSString
}
}

if (callToAction) {
// Added NSNull class check as we may receive callToAction value as NULL class
// when null is passed as value for key callToAction in webView message.
if (callToAction && ![callToAction isKindOfClass:[NSNull class]]) {
extras[CLTAP_PROP_WZRK_CTA] = callToAction;
}
if (buttonId) {
if (buttonId && ![buttonId isKindOfClass:[NSNull class]]) {
extras[@"button_id"] = buttonId;
}
NSString *campaignId = self.notification.campaignId;
Expand Down

0 comments on commit 2c8163d

Please sign in to comment.