npm modules updated

This commit is contained in:
2018-03-09 16:48:44 -05:00
parent fc9075c33f
commit 9916b559fd
78 changed files with 2820 additions and 511 deletions

View File

@@ -220,10 +220,6 @@ Request.prototype.create = function () {
xhr.setRequestHeader('Accept', '*/*');
} catch (e) {}
if (this.supportsBinary) {
xhr.responseType = 'arraybuffer';
}
// ie6 check
if ('withCredentials' in xhr) {
xhr.withCredentials = true;
@@ -245,8 +241,8 @@ Request.prototype.create = function () {
if (xhr.readyState === 2) {
try {
var contentType = xhr.getResponseHeader('Content-Type');
if (contentType !== 'application/octet-stream') {
xhr.responseType = 'text';
if (self.supportsBinary && contentType === 'application/octet-stream') {
xhr.responseType = 'arraybuffer';
}
} catch (e) {}
}
@@ -358,11 +354,7 @@ Request.prototype.onLoad = function () {
contentType = this.xhr.getResponseHeader('Content-Type');
} catch (e) {}
if (contentType === 'application/octet-stream') {
if (this.xhr.responseType === 'arraybuffer') {
data = this.xhr.response || this.xhr.responseText;
} else {
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
}
data = this.xhr.response || this.xhr.responseText;
} else {
data = this.xhr.responseText;
}