mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Fix #639: Only check for Brave properties if given userAgent match the current userAgent
This commit is contained in:
parent
e70d09a1f8
commit
82567c28ab
@ -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)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user