diff --git a/src/parser-browsers.js b/src/parser-browsers.js index 4d91891..ee58810 100644 --- a/src/parser-browsers.js +++ b/src/parser-browsers.js @@ -1031,7 +1031,6 @@ const browsersList = [ name: 'Brave', }; - // Try Client Hints brand version first if (parser) { const hintsVersion = parser.getBrandVersion('Brave'); if (hintsVersion) { diff --git a/test/unit/parser.js b/test/unit/parser.js index bb3f22e..b86fe25 100644 --- a/test/unit/parser.js +++ b/test/unit/parser.js @@ -386,7 +386,7 @@ test('Parser with Edge client hints', (t) => { const BRAVE_HINTS = { brands: [ - { brand: 'Brave', version: '1.73.97' }, + { brand: 'Brave', version: '144' }, { brand: 'Chromium', version: '131' }, { brand: 'Not_A Brand', version: '24' }, ], @@ -400,7 +400,7 @@ const BRAVE_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ( test('Parser detects Brave from client hints brands', (t) => { const p = new Parser(BRAVE_UA, false, BRAVE_HINTS); t.is(p.getBrowserName(), 'Brave'); - t.is(p.getBrowserVersion(), '1.73.97'); + t.is(p.getBrowserVersion(), '144'); }); test('Parser.hasBrand detects Brave', (t) => { @@ -411,5 +411,5 @@ test('Parser.hasBrand detects Brave', (t) => { test('Parser.getBrandVersion returns version for Brave', (t) => { const p = new Parser(BRAVE_UA, false, BRAVE_HINTS); - t.is(p.getBrandVersion('Brave'), '1.73.97'); + t.is(p.getBrandVersion('Brave'), '144'); });