Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: edge #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ua-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,11 +678,11 @@ module.exports = function (ua) {
};
}
// Microsoft Edge
else if (/Edge\/12/i.test(ua) && /Windows Phone|Windows NT/i.test(ua)) {
else if (match = /Edge\/(\d+([\d\.]+)?)/i.exec(ua) && /Windows Phone|Windows NT/i.test(ua)) {
uaData.browser.name = 'Microsoft Edge';
uaData.browser.version = {
major: '12',
original: '12'
// major: match[1],
original: match[1],
};
}
// miui browser
Expand Down
3 changes: 2 additions & 1 deletion test/test_input
Original file line number Diff line number Diff line change
Expand Up @@ -3289,4 +3289,5 @@ vivo_Y11iW/1.0 Linux/3.4.5 Android/4.2.2 Release/02.11.2015 Browser/AppleWebKit5
vivo_Y11iW/V1.0 Linux/3.4.5 Android/4.2.2 Release/02.11.2015 AppleWebKit/537.36 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mobile Safari/537.36 System/Android 4.2.2
vivo_Y613F/V1.0 Linux/3.10.28-svn1131 Android/4.4.4 Release/10.08.2014 AppleWebKit/537.36 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mobile Safari/537.36 System/Android 4.4.4
vivo_Y622/V1.0 Linux/3.4.5 Android/4.2.2 Release/03.12.2015 AppleWebKit/537.36 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mobile Safari/537.36 System/Android 4.2.2
vivo_Y628/V1.0 Linux/3.10.28-svn930 Android/4.4.4 Release/09.22.2014 AppleWebKit/537.36 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mobile Safari/537.36 System/Android 4.4.4
vivo_Y628/V1.0 Linux/3.10.28-svn930 Android/4.4.4 Release/09.22.2014 AppleWebKit/537.36 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mobile Safari/537.36 System/Android 4.4.4
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134