You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by da...@apache.org on 2017/09/26 04:23:18 UTC
[19/46] incubator-weex git commit: * [html5] fix error under firefox
ios.
* [html5] fix error under firefox ios.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1ceb3749
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1ceb3749
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1ceb3749
Branch: refs/heads/0.16-dev
Commit: 1ceb3749b1862ebf6e3eee5a0a1ddb3fe0d0d603
Parents: 31411dd
Author: MrRaindrop <te...@gmail.com>
Authored: Mon Sep 4 17:26:03 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Mon Sep 4 17:26:03 2017 +0800
----------------------------------------------------------------------
html5/render/vue/lib/envd/index.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ceb3749/html5/render/vue/lib/envd/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/lib/envd/index.js b/html5/render/vue/lib/envd/index.js
index 99b6fd6..df9fdf3 100644
--- a/html5/render/vue/lib/envd/index.js
+++ b/html5/render/vue/lib/envd/index.js
@@ -55,7 +55,7 @@ else if ((match = ua.match(/(iPhone|iPad|iPod)/))) {
isIPhone: (name === 'iPhone' || name === 'iPod'),
isIPad: name === 'iPad',
isIOS: true,
- version: match[1].split('_').join('.')
+ version: match && match[1].split('_').join('.') || ''
}
}
else {
@@ -155,7 +155,7 @@ else if (ua.match(/iPhone|iPad|iPod/)) {
env.browser = {
name: 'Safari',
isSafari: true,
- version: match[1]
+ version: match && match[1] || ''
}
}
else {
@@ -163,7 +163,7 @@ else if (ua.match(/iPhone|iPad|iPod/)) {
env.browser = {
name: 'iOS Webview',
isWebview: true,
- version: match[1].replace(/_/g, '.')
+ version: match && match[1].replace(/_/g, '.') || ''
}
}
}