Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBrowserName() undefined #485

Open
psxpa3 opened this issue Jul 12, 2021 · 0 comments
Open

getBrowserName() undefined #485

psxpa3 opened this issue Jul 12, 2021 · 0 comments

Comments

@psxpa3
Copy link

psxpa3 commented Jul 12, 2021

Hello,

I am working on upgrading "bowser" from 1.9.4 -> 2.11.0; however, getting the following error - "getBowserName() does not exist for undefined". Here the undefined is the return value of getParser().
const browser = Bowser.getParser(window.navigator.userAgent);
I am using this "browser" object to retrieve browser (firefox etc), however, not able to proceed.

Previously the codebase had these statements to access the browser which was working properly.

import * as Bowser from "bowser";
(Bowser.browser === "firefox")

"typescript": "3.9.9"

I have followed the steps mentioned on the documentation - https://www.npmjs.com/package/bowser. Not sure how to resolve this error. Any help would be highly appreciated. If any other information is needed from my end, then please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant