Fix #389 TypeError when $=null

This commit is contained in:
Faisal Salman 2019-12-14 06:18:46 +07:00
parent 7fca67cbc7
commit 5cbd2fa795

View File

@ -886,7 +886,7 @@
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used, // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
// and we should catch that. // and we should catch that.
var $ = window && (window.jQuery || window.Zepto); var $ = window && (window.jQuery || window.Zepto);
if (typeof $ !== UNDEF_TYPE && !$.ua) { if ($ && !$.ua) {
var parser = new UAParser(); var parser = new UAParser();
$.ua = parser.getResult(); $.ua = parser.getResult();
$.ua.get = function () { $.ua.get = function () {