@neonjungle/birdseed
Advanced tools
Comparing version 0.3.10 to 0.3.11
@@ -26,5 +26,13 @@ import Bowser from "bowser"; | ||
let browserDetails = this.browser.getBrowser(); | ||
let versionString = | ||
browserDetails.name + " version " + browserDetails.version; | ||
let versionString = ""; | ||
// Unfortunately we dont always get the version (see isValidBrowser notes) | ||
if (browserDetails.version) { | ||
versionString = `${browserDetails.name} version ${ | ||
browserDetails.version | ||
}`; | ||
} else { | ||
versionString = `an out of date version of ${browserDetails.name}`; | ||
} | ||
document.body.insertAdjacentHTML( | ||
@@ -53,2 +61,12 @@ "afterbegin", | ||
isValidBrowser() { | ||
const fullBrowserDetails = this.browser.getResult(); | ||
// Work around Bowser not giving us a browser version to work with when in WebView on iOS. -JS | ||
// See this issue for more details: https://github.com/lancedikson/bowser/issues/204 | ||
if ( | ||
fullBrowserDetails.os.name === "iOS" && | ||
!fullBrowserDetails.browser.version | ||
) { | ||
let majorVersion = parseInt(fullBrowserDetails.os.version.split(".")[0]); | ||
return majorVersion >= 10; | ||
} | ||
return this.browser.satisfies(this.browserVersions); | ||
@@ -55,0 +73,0 @@ } |
{ | ||
"name": "@neonjungle/birdseed", | ||
"version": "0.3.10", | ||
"version": "0.3.11", | ||
"description": "Collection of handy utility methods for Neon Jungle", | ||
@@ -5,0 +5,0 @@ "main": "", |
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
22872
691