Skip to content

Commit

Permalink
fix: brave browser detection in parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Jan 25, 2022
1 parent 77b5f0a commit b56c16c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/browser-dtector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ class BrowserDetector {
const version = browserMatch[4] || browserMatch[2] || null;

// brave browser doesn't expose itslef via useragent
// but as chrome browser
const navigator = getNavigator();
if (typeof navigator?.brave?.isBrave === 'function') {
if (
name === 'chrome'
&& typeof navigator?.brave?.isBrave === 'function'
) {
name = 'brave';
}

Expand Down

0 comments on commit b56c16c

Please sign in to comment.