AhsanAyaz / ngx-device-detector

An Angular v7+ library to detect the device, OS, and browser details.
https://ahsanayaz.github.io/ngx-device-detector
MIT License
517 stars 101 forks source link

MacOS 11.4 is detected as MacOS 11.0 #222

Open AlexanderLohmeyer opened 3 years ago

AlexanderLohmeyer commented 3 years ago

Hi, i am using ngx-device-detector in angular 11/electron 11 environment. I am currently on the latest macOS 11.4 version

stringified Output of getDeviceInfo():

{
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_4_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Electron/11.4.7 Safari/537.36",
  "os": "Mac",
  "browser": "Chrome",
  "device": "Macintosh",
  "os_version": "mac-os-x-11-0",
  "browser_version": "87.0.4280.141",
  "deviceType": "desktop",
  "orientation": "landscape"
}

Although the user-agent outputs the right version 11.4, the os_version is shown as mac-os-x-11-0. The expected output were either mac-os-11-4 or mac-os-11.