Closed virtualbjorn closed 5 years ago
I suppose you haven't used the library as intended/documented.
Please send the code where you instantiate (new
) MobileDetect.
var mobileDetect = new MobileDetect(window.navigator.userAgent);
console.log(mobileDetect.userAgent()); // returns empty
console.log(mobileDetect.userAgents()); // returns [] also empty
btw, I'm using mobile-detect.min.js
this library works only for mobile environments.
Most info (like userAgent
) target mobile browsers.
See also #73
Issue
[x] I've read above note and I'm quite sure I have a real issue with mobile-detect.js
Here's the userAgent string
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; rv:11.0) like Gecko
I tried using the mobile-detect.min.js and failed to get userAgent(), it is just empty.