Skip to content

Commit

Permalink
Fix #639: Only check for Brave properties if given userAgent match th…
Browse files Browse the repository at this point in the history
…e current userAgent
  • Loading branch information
faisalman committed Mar 26, 2023
1 parent e70d09a commit 82567c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@
switch(this.itemType) {
case UA_BROWSER:
// Brave-specific detection
if (NAVIGATOR && NAVIGATOR.brave && typeof NAVIGATOR.brave.isBrave == FUNC_TYPE) {
if (NAVIGATOR && NAVIGATOR.userAgent == ua && NAVIGATOR.brave && typeof NAVIGATOR.brave.isBrave == FUNC_TYPE) {
this.set(NAME, 'Brave');
}
this.set(MAJOR, majorize(this.get(VERSION)));
Expand Down

0 comments on commit 82567c2

Please sign in to comment.