Merge branch 'master' of github.com:faisalman/ua-parser-js

This commit is contained in:
Faisal Salman 2017-07-17 22:51:38 +07:00
commit 91b046462c

View File

@ -929,7 +929,7 @@
define(function () {
return UAParser;
});
} else {
} else if (window) {
// browser env
window.UAParser = UAParser;
}
@ -940,7 +940,7 @@
// In AMD env the global scope should be kept clean, but jQuery is an exception.
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
// and we should catch that.
var $ = window.jQuery || window.Zepto;
var $ = window && (window.jQuery || window.Zepto);
if (typeof $ !== UNDEF_TYPE) {
var parser = new UAParser();
$.ua = parser.getResult();