auditted lodash usage to ensure that it is compatible with lodash 3.0

This commit is contained in:
Spencer Alger
2015-03-17 13:47:44 -07:00
parent ed26798e5e
commit ec6b0fcefc
10 changed files with 26 additions and 18 deletions

View File

@ -30,7 +30,8 @@ if (typeof XMLHttpRequest !== 'undefined') {
};
} else {
// find the first MS implementation available
getXhr = _.first(['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], function (appName) {
getXhr = _(['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'])
.map(function (appName) {
/* jshint unused: false */
try {
var test = new window.ActiveXObject(appName);
@ -38,9 +39,11 @@ if (typeof XMLHttpRequest !== 'undefined') {
return new window.ActiveXObject(appName);
};
} catch (e) {
return null;
return false;
}
});
})
.compact()
.first();
}
if (!getXhr) {