Skip to content

Commit

Permalink
Backport - Improve browser detection: remove unnecessary extra space …
Browse files Browse the repository at this point in the history
…in "Avant " (cherry picked from commit f56073b)
  • Loading branch information
faisalman committed Oct 27, 2023
1 parent e3d5f76 commit 23c5d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
/(kindle)\/([\w\.]+)/i, // Kindle
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
// Trident based
/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
/(ba?idubrowser)[\/ ]?([\w\.]+)/i, // Baidu Browser
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer

Expand Down
2 changes: 1 addition & 1 deletion test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"ua" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
"expect" :
{
"name" : "Avant ",
"name" : "Avant",
"version" : "undefined",
"major" : "undefined"
}
Expand Down

0 comments on commit 23c5d77

Please sign in to comment.