Fix CSP issues for missing files (404)

This commit is contained in:
yflory
2018-06-12 15:15:46 +02:00
parent 9fbf507cda
commit 01a3c13a8c
4 changed files with 6 additions and 3 deletions

View File

@@ -65,6 +65,7 @@ define([
xhr.setRequestHeader('Range', 'bytes=0-1');
xhr.responseType = 'arraybuffer';
xhr.onerror= function () { return CB('XHR_ERROR'); };
xhr.onload = function () {
if (/^4/.test('' + this.status)) { return CB('XHR_ERROR'); }
var res = new Uint8Array(xhr.response);