mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Fix #259: Avoid collision when using $.ua
This commit is contained in:
parent
1493587742
commit
55ffb10a5f
@ -1077,7 +1077,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) {
|
||||
if (typeof $ !== UNDEF_TYPE && !$.ua) {
|
||||
var parser = new UAParser();
|
||||
$.ua = parser.getResult();
|
||||
$.ua.get = function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user