nuke-core
Advanced tools
Comparing version 2.0.16 to 2.0.17
@@ -19,3 +19,3 @@ 'use strict'; | ||
} else { | ||
var userAgent = navigator ? navigator.userAgent.toLowerCase() : 'iPhone'; | ||
var userAgent = typeof navigator !== 'undefined' && navigator.userAgent ? navigator.userAgent.toLowerCase() : 'iPhone'; | ||
platform.iOS = /iPhone|iPod|iPad|IOS/i.test(userAgent); | ||
@@ -22,0 +22,0 @@ platform.android = /Android/i.test(userAgent); |
{ | ||
"name": "nuke-core", | ||
"version": "2.0.16", | ||
"version": "2.0.17", | ||
"description": "nuke 核心变量", | ||
@@ -5,0 +5,0 @@ "main": "lib/nuke", |
@@ -11,9 +11,9 @@ const isWeex = typeof callNative === 'function'; | ||
let WeexEnv = | ||
typeof window !== 'undefined' && window.hasOwnProperty('__weex_env__') | ||
? Object.assign({}, window.__weex_env__) | ||
: Object.assign({}, WXEnvironment); | ||
typeof window !== 'undefined' && window.hasOwnProperty('__weex_env__') ? | ||
Object.assign({}, window.__weex_env__) : | ||
Object.assign({}, WXEnvironment); | ||
platform.iOS = WeexEnv.platform === 'iOS'; | ||
platform.android = WeexEnv.platform === 'android'; | ||
} else { | ||
var userAgent = navigator ? navigator.userAgent.toLowerCase() : 'iPhone'; | ||
var userAgent = typeof navigator !== 'undefined' && navigator.userAgent ? navigator.userAgent.toLowerCase() : 'iPhone'; | ||
platform.iOS = /iPhone|iPod|iPad|IOS/i.test(userAgent); | ||
@@ -20,0 +20,0 @@ platform.android = /Android/i.test(userAgent); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107863