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
13561356 decisionHandler : (void (^)(WKNavigationResponsePolicy ))decisionHandler
13571357{
13581358 WKNavigationResponsePolicy policy = WKNavigationResponsePolicyAllow ;
1359- if (_onHttpError && navigationResponse. forMainFrame ) {
1359+ if (_onHttpError) {
13601360 if ([navigationResponse.response isKindOfClass: [NSHTTPURLResponse class ]]) {
13611361 NSHTTPURLResponse *response = (NSHTTPURLResponse *)navigationResponse.response ;
13621362 NSInteger statusCode = response.statusCode ;
13631363
1364- if (statusCode >= 400 ) {
1364+ if (statusCode >= 400 && navigationResponse. forMainFrame ) {
13651365 NSMutableDictionary <NSString *, id > *httpErrorEvent = [self baseEvent ];
13661366 [httpErrorEvent addEntriesFromDictionary: @{
13671367 @" url" : response.URL .absoluteString ,
You can’t perform that action at this time.
0 commit comments