bowser icon indicating copy to clipboard operation
bowser copied to clipboard

Unable to correctly parse macOS version

Open zhheo opened this issue 3 years ago • 1 comments

Template to report about browser detection issue

window.navigator.userAgent of the browser is: ... (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 And it's detected like ...macOS 11.0.0 However, the real name of the browser is ...macOS 11.0.1

My macos version is 11. 0. 1, but UA shows 11. 0. 0. I have an idea to change the version number to "macOS BIg Sur" like "macOS Catalina"

zhheo avatar Dec 05 '20 10:12 zhheo

const Bowser = require("[email protected]");
const browser = Bowser.getParser('Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36');
console.log(browser.getOS());
// {name: "macOS", version: "11.0.0"}

imaegoo avatar Dec 05 '20 10:12 imaegoo