Skip to content

Commit f2cd043

Browse files
author
Michael Laktionov
committed
update ua-parser-js
1 parent 04277e2 commit f2cd043

File tree

3 files changed

+138
-196
lines changed

3 files changed

+138
-196
lines changed

main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var getNavigatorInstance = function getNavigatorInstance() {
3232
};
3333
var isIOS13Check = function isIOS13Check(type) {
3434
var nav = getNavigatorInstance();
35-
return nav && (nav.platform.includes(type) || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
35+
return nav && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
3636
};
3737

3838
function _typeof(obj) {
@@ -428,7 +428,7 @@ var isIEType = function isIEType() {
428428
var isElectronType = function isElectronType() {
429429
var nav = getNavigatorInstance();
430430
var ua = nav && nav.userAgent.toLowerCase();
431-
return typeof ua === 'string' ? ua.includes('electron') : false;
431+
return typeof ua === 'string' ? /electron/.test(ua) : false;
432432
};
433433

434434
var getIOS13 = function getIOS13() {
@@ -497,9 +497,9 @@ var isConsole = isConsoleType();
497497
var isWearable = isWearableType();
498498
var isMobileSafari = isMobileSafariType();
499499
var isChromium = isChromiumType();
500-
var isMobile = isMobileAndTabletType();
500+
var isMobile = isMobileAndTabletType() || getIPad13();
501501
var isMobileOnly = isMobileType();
502-
var isTablet = isTabletType();
502+
var isTablet = isTabletType() || getIPad13();
503503
var isBrowser = isBrowserType();
504504
var isAndroid = isAndroidType();
505505
var isWinPhone = isWinPhoneType();

0 commit comments

Comments
 (0)