1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Updated the check for generic browsers

This commit is contained in:
Ricardo Rauber Pereira
2019-04-05 18:18:39 +01:00
parent f1bdd50116
commit 3bfb24c8cb
2 changed files with 12 additions and 2 deletions

View File

@@ -590,9 +590,10 @@ const browsersList = [
{
test: [/.*/i],
describe(ua) {
const regexp = ua.search("\\(") == -1 ? /^(.*)\/(.*) / : /^(.*)\/(.*)\((.*) /
return {
name: Utils.getFirstMatch(/^(.*)\/(.*)\((.*) /, ua),
version: Utils.getSecondMatch(/^(.*)\/(.*)\((.*) /, ua),
name: Utils.getFirstMatch(regexp, ua),
version: Utils.getSecondMatch(regexp, ua),
};
},
},