Skip to content

Commit edb6177

Browse files
authored
[LP-11004] Fixing not hiding rich interstitial (#326)
* [LP-11004] Fixing not hiding rich interstitial * Make sure dismiss is guarded
1 parent 83f8b74 commit edb6177

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Leanplum-SDK/Classes/LPMessageTemplates.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ - (void)accept
821821

822822
- (void)dismiss
823823
{
824+
LP_TRY
824825
[self closePopupWithAnimation:YES];
826+
LP_END_TRY
825827
}
826828

827829
- (void)enablePush
@@ -1437,7 +1439,10 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati
14371439
return;
14381440
}
14391441
}
1440-
@catch (NSException *exception) {
1442+
@catch (id exception) {
1443+
// In case we catch exception here, hide the overlaying message.
1444+
[self dismiss];
1445+
// Handle the exception message.
14411446
LOG_LP_MESSAGE_EXCEPTION;
14421447
}
14431448
decisionHandler(WKNavigationActionPolicyAllow);

0 commit comments

Comments
 (0)