Skip to content

Commit

Permalink
fix: chromium edge browser detection (#1446)
Browse files Browse the repository at this point in the history
* fix: only detect chromium edge browser

* chore: fix linting
  • Loading branch information
DanielSinclair committed Aug 3, 2023
1 parent 6959544 commit 6b5e22a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/rainbowkit/src/utils/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export function getBrowser(): BrowserType {
const ua = navigator.userAgent.toLowerCase();
// @ts-ignore
if (navigator.brave?.isBrave) return BrowserType.Brave;
else if (ua.indexOf('edge') > -1 || ua.indexOf('edg/') > -1)
return BrowserType.Edge;
else if (ua.indexOf('edg/') > -1) return BrowserType.Edge;
else if (ua.indexOf('op') > -1) return BrowserType.Opera;
else if (isArc()) return BrowserType.Arc;
else if (ua.indexOf('chrome') > -1) return BrowserType.Chrome;
Expand Down

2 comments on commit 6b5e22a

@vercel
Copy link

@vercel vercel bot commented on 6b5e22a Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6b5e22a Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.