mirror of https://github.com/gorhill/uBlock.git
Asset loader: take local file XHR status in mind
This commit is contained in:
parent
1c36d8ce00
commit
23bfecfa50
|
@ -263,7 +263,7 @@ var cachedAssetsManager = (function() {
|
||||||
var getTextFileFromURL = function(url, onLoad, onError) {
|
var getTextFileFromURL = function(url, onLoad, onError) {
|
||||||
// https://github.com/gorhill/uMatrix/issues/15
|
// https://github.com/gorhill/uMatrix/issues/15
|
||||||
var onResponseReceived = function() {
|
var onResponseReceived = function() {
|
||||||
if ( this.status < 200 || this.status >= 300 ) {
|
if ( this.status !== 0 && ( this.status < 200 || this.status >= 300 ) ) {
|
||||||
return onError.call(this);
|
return onError.call(this);
|
||||||
}
|
}
|
||||||
// xhr for local files gives status 0, but actually succeeds
|
// xhr for local files gives status 0, but actually succeeds
|
||||||
|
|
Loading…
Reference in New Issue