handle non-200 status codes

pull/1/head
ansuz 8 years ago
parent 4c4c21342d
commit 18d959ef16

@ -101,11 +101,11 @@ define([], function () {
xhr.open("GET", src, true); xhr.open("GET", src, true);
xhr.responseType = "arraybuffer"; xhr.responseType = "arraybuffer";
xhr.onload = function () { xhr.onload = function () {
if (this.status !== 200) {
return CB('XHR_ERROR');
}
return void CB(void 0, new Uint8Array(xhr.response)); return void CB(void 0, new Uint8Array(xhr.response));
}; };
xhr.onerror = function () {
CB('XHR_ERROR');
};
xhr.send(null); xhr.send(null);
}; };

Loading…
Cancel
Save