From 23bfecfa50242d2ac72140bebf08c6129ddc9725 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 15 Feb 2015 16:49:37 -0700 Subject: [PATCH] Asset loader: take local file XHR status in mind --- src/js/assets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/assets.js b/src/js/assets.js index 074a13fa6..4f361dd2c 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -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