You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/10/19 04:33:24 UTC

[21/50] [abbrv] incubator-weex git commit: * [ios] web filter error

* [ios] web filter error


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8d1552f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8d1552f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8d1552f8

Branch: refs/heads/release
Commit: 8d1552f8728123774057b53093aea3494d8ba36a
Parents: d3c5ddd
Author: gurisxie <27...@qq.com>
Authored: Tue Oct 17 14:02:01 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Tue Oct 17 15:48:46 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8d1552f8/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
index f66bd11..792d4c9 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
@@ -200,6 +200,9 @@ WX_EXPORT_METHOD(@selector(goForward))
         NSMutableDictionary *data = [self baseInfo];
         [data setObject:[error localizedDescription] forKey:@"errorMsg"];
         [data setObject:[NSString stringWithFormat:@"%ld", (long)error.code] forKey:@"errorCode"];
+        if(error.userInfo && ![error.userInfo[NSURLErrorFailingURLStringErrorKey] hasPrefix:@"http"]){
+            return;
+        }
         [self fireEvent:@"error" params:data];
     }
 }