mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Fix #700 - Error on getOS() when userAgentData.platform is undefined
This commit is contained in:
parent
e7bfc4e28d
commit
3bfd164aa5
@ -872,7 +872,7 @@
|
|||||||
_os[NAME] = undefined;
|
_os[NAME] = undefined;
|
||||||
_os[VERSION] = undefined;
|
_os[VERSION] = undefined;
|
||||||
rgxMapper.call(_os, _ua, _rgxmap.os);
|
rgxMapper.call(_os, _ua, _rgxmap.os);
|
||||||
if (_isSelfNav && !_os[NAME] && _uach && _uach.platform != 'Unknown') {
|
if (_isSelfNav && !_os[NAME] && _uach && _uach.platform && _uach.platform != 'Unknown') {
|
||||||
_os[NAME] = _uach.platform
|
_os[NAME] = _uach.platform
|
||||||
.replace(/chrome os/i, CHROMIUM_OS)
|
.replace(/chrome os/i, CHROMIUM_OS)
|
||||||
.replace(/macos/i, MAC_OS); // backward compatibility
|
.replace(/macos/i, MAC_OS); // backward compatibility
|
||||||
|
Loading…
x
Reference in New Issue
Block a user