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

Function isSafari cannot match in some cases #1315

Open
1 task
ClytzeL opened this issue Dec 11, 2024 · 2 comments
Open
1 task

Function isSafari cannot match in some cases #1315

ClytzeL opened this issue Dec 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ClytzeL
Copy link

ClytzeL commented Dec 11, 2024

Describe the bug
<what's going wrong!?>

To Reproduce
<clear steps to reproduce are super helpful! Best is to provide an online sandbox, click to create one>
Function isSafari cannot match in some cases,an example like follows:

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)"  

Maybe change to this?

export const isSafari = () =>
  /^((?!chrome|android).)*webkit/i.test(navigator.userAgent);

Misc

  • Node version:
  • Package manager:
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
@ClytzeL ClytzeL added the bug Something isn't working label Dec 11, 2024
@YousefED
Copy link
Collaborator

Do you have an extension installed that strips the safari part of the useragent?

@ClytzeL
Copy link
Author

ClytzeL commented Dec 13, 2024

Do you have an extension installed that strips the safari part of the useragent?

I didn't install a extension, but I'm using a webview that's maintained internally, so the useragent may have been changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants