Asset loader: take local file XHR status in mind

This commit is contained in:
Chris 2015-02-15 16:49:37 -07:00
parent 1c36d8ce00
commit 23bfecfa50
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ var cachedAssetsManager = (function() {
var getTextFileFromURL = function(url, onLoad, onError) {
// https://github.com/gorhill/uMatrix/issues/15
var onResponseReceived = function() {
if ( this.status < 200 || this.status >= 300 ) {
if ( this.status !== 0 && ( this.status < 200 || this.status >= 300 ) ) {
return onError.call(this);
}
// xhr for local files gives status 0, but actually succeeds