Skip to content

Commit

Permalink
Merge pull request #535 from shimar/fix/534-oppo-reno5-a
Browse files Browse the repository at this point in the history
Enable to detect OPPO Reno5 A correctly.
  • Loading branch information
faisalman committed Oct 26, 2021
2 parents 95fea1c + 191fed9 commit b4cfe1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Expand Up @@ -404,7 +404,7 @@

// OPPO
/; (\w+) bui.+ oppo/i,
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [

// Vivo
Expand Down
9 changes: 9 additions & 0 deletions test/device-test.json
Expand Up @@ -1242,6 +1242,15 @@
"type": "mobile"
}
},
{
"desc": "OPPO Reno5 A",
"ua": "Mozilla/5.0 (Linux; Android 11; A101OP) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Mobile Safari/537.36",
"expect": {
"vendor": "OPPO",
"model": "A101OP",
"type": "mobile"
}
},
{
"desc": "OPPO Find X",
"ua": "Mozilla/5.0 (Linux; Android 8.1; PAFM00 Build/OPM1.171019.026) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36",
Expand Down

0 comments on commit b4cfe1b

Please sign in to comment.