diff options
-rw-r--r-- | src/js/assets.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/js/assets.js b/src/js/assets.js index 7338718..41e75ab 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -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); |