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:17 UTC
[14/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/f2d82803
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f2d82803
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f2d82803
Branch: refs/heads/release
Commit: f2d828037d255c22f407d8ee8eba4f11c73ea363
Parents: f4bfd22
Author: gurisxie <27...@qq.com>
Authored: Tue Oct 17 14:02:01 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Tue Oct 17 14:02:01 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/f2d82803/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];
}
}