File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1356,12 +1356,12 @@ - (void) webView:(WKWebView *)webView
1356
1356
decisionHandler : (void (^)(WKNavigationResponsePolicy ))decisionHandler
1357
1357
{
1358
1358
WKNavigationResponsePolicy policy = WKNavigationResponsePolicyAllow ;
1359
- if (_onHttpError && navigationResponse. forMainFrame ) {
1359
+ if (_onHttpError) {
1360
1360
if ([navigationResponse.response isKindOfClass: [NSHTTPURLResponse class ]]) {
1361
1361
NSHTTPURLResponse *response = (NSHTTPURLResponse *)navigationResponse.response ;
1362
1362
NSInteger statusCode = response.statusCode ;
1363
1363
1364
- if (statusCode >= 400 ) {
1364
+ if (statusCode >= 400 && navigationResponse. forMainFrame ) {
1365
1365
NSMutableDictionary <NSString *, id > *httpErrorEvent = [self baseEvent ];
1366
1366
[httpErrorEvent addEntriesFromDictionary: @{
1367
1367
@" url" : response.URL .absoluteString ,
You can’t perform that action at this time.
0 commit comments