handle more response codes, use metadata

This commit is contained in:
ansuz
2017-05-12 17:34:29 +02:00
parent 18d959ef16
commit 30f6ef3f85
2 changed files with 8 additions and 8 deletions

View File

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