mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 22:52:16 +03:00
Fix #639: Only check for Brave properties if given userAgent match the current userAgent
This commit is contained in:
@@ -987,7 +987,7 @@
|
|||||||
switch(this.itemType) {
|
switch(this.itemType) {
|
||||||
case UA_BROWSER:
|
case UA_BROWSER:
|
||||||
// Brave-specific detection
|
// 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(NAME, 'Brave');
|
||||||
}
|
}
|
||||||
this.set(MAJOR, majorize(this.get(VERSION)));
|
this.set(MAJOR, majorize(this.get(VERSION)));
|
||||||
|
|||||||
Reference in New Issue
Block a user