Skip to content

Commit

Permalink
Asset loader: take local file XHR status in mind
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisaljoudi committed Feb 15, 2015
1 parent 1c36d8c commit 23bfecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23bfecf

Please sign in to comment.