in src/mixins/isClientMobile.js [17:30]
isClientMobile() {
let check = false;
// detect if the device is a multi touch one
if ('maxTouchPoints' in navigator || 'msMaxTouchPoints' in navigator) {
check = Boolean(navigator.maxTouchPoints || navigator.msMaxTouchPoints);
} else {
// fallback to testing if the device has a precise pointer (mouse) or not
check = window.matchMedia
? window.matchMedia('(pointer:coarse)').matches
// check for `orientation` in window object, if client does not support `matchMedia`
: 'orientation' in window;
}
return check;
},