diff --git a/lib/useragent-base.js b/lib/useragent-base.js index b596fb9..64d543e 100755 --- a/lib/useragent-base.js +++ b/lib/useragent-base.js @@ -2558,6 +2558,12 @@ module.exports = (function () { detect: function (ua) { + // when ua is not a string, just do not detect it slient + if(typeof ua !== 'string') { + // throw new TypeError('ua must be a string') + return this; + } + /**************************************************** * Unix */