@enact/core
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -5,2 +5,6 @@ # Change Log | ||
## [1.4.0] - 2017-06-29 | ||
No significant changes. | ||
## [1.3.1] - 2017-06-14 | ||
@@ -7,0 +11,0 @@ |
{ | ||
"name": "@enact/core", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Enact is an open source JavaScript framework containing everything you need to create a fast, scalable mobile or web application.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -95,3 +95,6 @@ 'use strict'; | ||
var detect = function detect() { | ||
if (typeof window === 'undefined') { | ||
if (_platform) { | ||
// if we've already determined the platform, we'll use that determination | ||
return _platform; | ||
} else if (typeof window === 'undefined') { | ||
return { | ||
@@ -103,31 +106,32 @@ gesture: false, | ||
}; | ||
} else if (!_platform) { | ||
var userAgent = ua(); | ||
} | ||
_platform = { | ||
gesture: hasGesture(), | ||
node: false, | ||
touch: hasTouch(), | ||
unknown: true | ||
}; | ||
var userAgent = ua(); | ||
for (var i = 0, p, m, v; p = platforms[i]; i++) { | ||
m = p.regex.exec(userAgent); | ||
if (m) { | ||
_platform.unknown = false; | ||
_platform = { | ||
gesture: hasGesture(), | ||
node: false, | ||
touch: hasTouch(), | ||
unknown: true | ||
}; | ||
if (p.forceVersion) { | ||
v = p.forceVersion; | ||
} else { | ||
v = Number(m[1]); | ||
} | ||
_platform[p.platform] = v; | ||
if (p.extra) { | ||
_platform = _extends({}, _platform, p.extra); | ||
} | ||
_platform.platformName = p.platform; | ||
break; | ||
for (var i = 0, p, m, v; p = platforms[i]; i++) { | ||
m = p.regex.exec(userAgent); | ||
if (m) { | ||
_platform.unknown = false; | ||
if (p.forceVersion) { | ||
v = p.forceVersion; | ||
} else { | ||
v = Number(m[1]); | ||
} | ||
_platform[p.platform] = v; | ||
if (p.extra) { | ||
_platform = _extends({}, _platform, p.extra); | ||
} | ||
_platform.platformName = p.platform; | ||
break; | ||
} | ||
} | ||
return _platform; | ||
@@ -134,0 +138,0 @@ }; |
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
122967
3218