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

floating number wrong: md.version("iPhone") #100

Closed
yangliuyiyitlp opened this issue Dec 13, 2019 · 1 comment
Closed

floating number wrong: md.version("iPhone") #100

yangliuyiyitlp opened this issue Dec 13, 2019 · 1 comment

Comments

@yangliuyiyitlp
Copy link

yangliuyiyitlp commented Dec 13, 2019

code:
var device_type = navigator.userAgent;
var md = new MobileDetect(device_type);
console.log(md.version("iPhone"))

result: should 10.3.1 but 10.31

The 2 decimal places after the version number are not separated

@hgoebl
Copy link
Owner

hgoebl commented Dec 13, 2019

this is how the "logic" is intented. Convert a version string to a single number.
If you need something like SemVer, then consume the version string.

@hgoebl hgoebl closed this as completed Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants