mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Fix #389 TypeError when $=null
This commit is contained in:
parent
7fca67cbc7
commit
5cbd2fa795
@ -886,7 +886,7 @@
|
||||
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
|
||||
// and we should catch that.
|
||||
var $ = window && (window.jQuery || window.Zepto);
|
||||
if (typeof $ !== UNDEF_TYPE && !$.ua) {
|
||||
if ($ && !$.ua) {
|
||||
var parser = new UAParser();
|
||||
$.ua = parser.getResult();
|
||||
$.ua.get = function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user