fixed a warning in XHR.send

This commit is contained in:
antelle 2019-09-14 22:21:21 +02:00
parent 27d86d8185
commit 0b8bc1afb0
1 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,11 @@ _.extend(StorageBase.prototype, {
_.forEach(config.headers, (value, key) => {
xhr.setRequestHeader(key, value);
});
xhr.send(config.data);
let data = config.data;
if (data instanceof ArrayBuffer) {
data = new Uint8Array(data);
}
xhr.send(data);
},
_openPopup(url, title, width, height) {