handle non-200 status codes
This commit is contained in:
@@ -101,11 +101,11 @@ define([], function () {
|
||||
xhr.open("GET", src, true);
|
||||
xhr.responseType = "arraybuffer";
|
||||
xhr.onload = function () {
|
||||
if (this.status !== 200) {
|
||||
return CB('XHR_ERROR');
|
||||
}
|
||||
return void CB(void 0, new Uint8Array(xhr.response));
|
||||
};
|
||||
xhr.onerror = function () {
|
||||
CB('XHR_ERROR');
|
||||
};
|
||||
xhr.send(null);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user