Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
this fixes #708
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Feb 6, 2015
1 parent 863aaa5 commit a24d22c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/js/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,13 @@ var readExternalAsset = function(path, callback) {

var onExternalFileLoaded = function() {
this.onload = this.onerror = null;
// https://github.com/gorhill/uBlock/issues/708
// A successful download should never return an empty file: turn this
// into an error condition.
if ( stringIsNotEmpty(this.responseText) === false ) {
onExternalFileError();
return;
}
//console.log('µBlock> readExternalAsset("%s") / onExternalFileLoaded1()', path);
cachedAssetsManager.save(path, this.responseText);
reportBack(this.responseText);
Expand Down

0 comments on commit a24d22c

Please sign in to comment.