Skip to content

Commit 23c5d77

Browse files
committed
Backport - Improve browser detection: remove unnecessary extra space in "Avant " (cherry picked from commit f56073b)
1 parent e3d5f76 commit 23c5d77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ua-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
/(kindle)\/([\w\.]+)/i, // Kindle
231231
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
232232
// Trident based
233-
/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
233+
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
234234
/(ba?idubrowser)[\/ ]?([\w\.]+)/i, // Baidu Browser
235235
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
236236

test/browser-test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"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)",
115115
"expect" :
116116
{
117-
"name" : "Avant ",
117+
"name" : "Avant",
118118
"version" : "undefined",
119119
"major" : "undefined"
120120
}

0 commit comments

Comments
 (0)