Skip to content

Commit

Permalink
Only set browser as Chromium if no other brand was found
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Mar 29, 2023
1 parent b098789 commit 1e80cf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,8 @@
if (brands) {
for (var i in brands) {
var brandName = brands[i].brand,
brandVersion = brands[i].version;
if (!/not.a.brand/i.test(brandName) || /chromi/i.test(this.get(NAME))) {
brandVersion = brands[i].version
if (!/not.a.brand/i.test(brandName) && i < 1 || /chromi/i.test(this.get(NAME))) {
this.set(NAME, strip(GOOGLE+' ', brandName))
.set(VERSION, brandVersion)
.set(MAJOR, majorize(brandVersion));
Expand Down

0 comments on commit 1e80cf3

Please sign in to comment.