Skip to content

Commit ea4b343

Browse files
wrlqwemarcuswestin
authored andcommitted
return after decisionHandler called to avoid call it more than once (marcuswestin#296)
1 parent 4a6f596 commit ea4b343

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WebViewJavascriptBridge/WKWebViewJavascriptBridge.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati
147147
[_base logUnkownMessage:url];
148148
}
149149
decisionHandler(WKNavigationActionPolicyCancel);
150+
return;
150151
}
151152

152153
if (strongDelegate && [strongDelegate respondsToSelector:@selector(webView:decidePolicyForNavigationAction:decisionHandler:)]) {

0 commit comments

Comments
 (0)