mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
this fixes #708
This commit is contained in:
parent
863aaa5401
commit
a24d22cd0f
1 changed files with 7 additions and 0 deletions
|
@ -820,6 +820,13 @@ var readExternalAsset = function(path, callback) {
|
||||||
|
|
||||||
var onExternalFileLoaded = function() {
|
var onExternalFileLoaded = function() {
|
||||||
this.onload = this.onerror = null;
|
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);
|
//console.log('µBlock> readExternalAsset("%s") / onExternalFileLoaded1()', path);
|
||||||
cachedAssetsManager.save(path, this.responseText);
|
cachedAssetsManager.save(path, this.responseText);
|
||||||
reportBack(this.responseText);
|
reportBack(this.responseText);
|
||||||
|
|
Loading…
Reference in a new issue