From 82567c28ab15227dc864f35f113c6df8a1ec40b8 Mon Sep 17 00:00:00 2001 From: Faisal Salman Date: Sun, 26 Mar 2023 11:57:17 +0700 Subject: [PATCH] Fix #639: Only check for Brave properties if given userAgent match the current userAgent --- src/ua-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index 3fb1e12..bdf7036 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -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)));