1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Act safe in case navigator doesn't have a userAgent.

This commit is contained in:
devel-pa 2016-08-24 18:30:09 +02:00
parent 09e12dcf7a
commit c7778c550e

View File

@ -395,7 +395,7 @@
return result
}
var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent : '')
var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')
bowser.test = function (browserList) {
for (var i = 0; i < browserList.length; ++i) {