File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/util-defaults-mode-browser/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import { memoize } from "@aws-sdk/property-provider" ;
22import type { DefaultsMode , ResolvedDefaultsMode } from "@aws-sdk/smithy-client" ;
33import type { Provider } from "@aws-sdk/types" ;
4- import { parse } from "bowser" ;
4+ import bowser from "bowser" ;
55
66import { DEFAULTS_MODE_OPTIONS } from "./constants" ;
77
@@ -45,7 +45,9 @@ export const resolveDefaultsModeConfig = ({
4545
4646const isMobileBrowser = ( ) : boolean => {
4747 const parsedUA =
48- typeof window !== "undefined" && window ?. navigator ?. userAgent ? parse ( window . navigator . userAgent ) : undefined ;
48+ typeof window !== "undefined" && window ?. navigator ?. userAgent
49+ ? bowser . parse ( window . navigator . userAgent )
50+ : undefined ;
4951 const platform = parsedUA ?. platform ?. type ;
5052 // Reference: https://github.com/lancedikson/bowser/blob/master/src/constants.js#L86
5153 return platform === "tablet" || platform === "mobile" ;
You can’t perform that action at this time.
0 commit comments