Skip to content

Commit

Permalink
fix(util-user-agent-browser): use default import from bowser (#1991)
Browse files Browse the repository at this point in the history
* fix(util-user-agent-browser): use default import from bowser

* fix: use default import for bowser

Reason: esModuleInterop is enabled in tsconfig.
Refs: bowser-js/bowser#284
  • Loading branch information
trivikr committed Feb 4, 2021
1 parent fa33f0b commit d2e8d4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/util-user-agent-browser/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Provider, UserAgent } from "@aws-sdk/types";
import { parse } from "bowser";
import bowser from "bowser";

import { DefaultUserAgentOptions } from "./configurations";

Expand All @@ -11,7 +11,7 @@ export const defaultUserAgent = ({
serviceId,
clientVersion,
}: DefaultUserAgentOptions): Provider<UserAgent> => async () => {
const parsedUA = window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined;
const parsedUA = window?.navigator?.userAgent ? bowser.parse(window.navigator.userAgent) : undefined;
const sections: UserAgent = [
// sdk-metadata
["aws-sdk-js", clientVersion],
Expand Down

0 comments on commit d2e8d4f

Please sign in to comment.