@shopify/browser
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -35,3 +35,3 @@ 'use strict'; | ||
get isMobile() { | ||
return MOBILE_DEVICE_TYPES.includes(this.ua.getDevice().type); | ||
return MOBILE_DEVICE_TYPES.includes(this.ua.getDevice().type) || this.isPOSFirstPartyDevice(); | ||
} | ||
@@ -106,2 +106,7 @@ | ||
this.ua = new uaParserJs.UAParser(userAgent); | ||
} // POS Go is a first party device that is not detected as a mobile device | ||
isPOSFirstPartyDevice() { | ||
return this.ua.getUA().includes('WSC6X') || this.ua.getUA().includes('WTH11'); | ||
} | ||
@@ -108,0 +113,0 @@ |
@@ -14,3 +14,3 @@ export interface Options { | ||
get unknown(): boolean; | ||
get isMobile(): boolean; | ||
get isMobile(): any; | ||
get isDesktop(): boolean; | ||
@@ -31,2 +31,3 @@ get isNativeApp(): any; | ||
constructor({ userAgent, supported }: Options); | ||
isPOSFirstPartyDevice(): any; | ||
} | ||
@@ -42,3 +43,3 @@ export declare function asPlainObject(browser?: Browser): { | ||
version: any; | ||
isMobile: boolean; | ||
isMobile: any; | ||
isNativeApp: any; | ||
@@ -45,0 +46,0 @@ isDesktop: boolean; |
{ | ||
"name": "@shopify/browser", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Utilities for extracting browser information from user-agents", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
20891
253