Skip to content

Commit 23bfecf

Browse files
committed
Asset loader: take local file XHR status in mind
1 parent 1c36d8c commit 23bfecf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/assets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ var cachedAssetsManager = (function() {
263263
var getTextFileFromURL = function(url, onLoad, onError) {
264264
// https://github.com/gorhill/uMatrix/issues/15
265265
var onResponseReceived = function() {
266-
if ( this.status < 200 || this.status >= 300 ) {
266+
if ( this.status !== 0 && ( this.status < 200 || this.status >= 300 ) ) {
267267
return onError.call(this);
268268
}
269269
// xhr for local files gives status 0, but actually succeeds

0 commit comments

Comments
 (0)