mirror of https://github.com/gorhill/uBlock.git
Fix error when site has only exception scriptlet filters
Cause by recent refactoring of scriptlet-related code.
This commit is contained in:
parent
be1f938c17
commit
cb6ff38f86
|
@ -259,12 +259,6 @@ export class ScriptletFilteringEngine {
|
|||
$mainWorldMap.clear();
|
||||
$isolatedWorldMap.clear();
|
||||
|
||||
if ( scriptletDetails.mainWorld === '' ) {
|
||||
if ( scriptletDetails.isolatedWorld === '' ) {
|
||||
return { filters: scriptletDetails.filters };
|
||||
}
|
||||
}
|
||||
|
||||
const scriptletGlobals = options.scriptletGlobals || {};
|
||||
|
||||
if ( options.debug ) {
|
||||
|
|
|
@ -335,10 +335,10 @@ export class ScriptletFilteringEngineEx extends ScriptletFilteringEngine {
|
|||
}
|
||||
|
||||
const contentScript = [];
|
||||
if ( scriptletDetails.mainWorld !== '' ) {
|
||||
if ( scriptletDetails.mainWorld ) {
|
||||
contentScript.push(mainWorldInjector.assemble(hostname, scriptletDetails));
|
||||
}
|
||||
if ( scriptletDetails.isolatedWorld !== '' ) {
|
||||
if ( scriptletDetails.isolatedWorld ) {
|
||||
contentScript.push(isolatedWorldInjector.assemble(hostname, scriptletDetails));
|
||||
}
|
||||
|
||||
|
@ -373,6 +373,9 @@ export class ScriptletFilteringEngineEx extends ScriptletFilteringEngine {
|
|||
contentScriptRegisterer.unregister(hostname);
|
||||
return;
|
||||
}
|
||||
if ( Boolean(scriptletDetails.code) === false ) {
|
||||
return scriptletDetails;
|
||||
}
|
||||
|
||||
const contentScript = [ scriptletDetails.code ];
|
||||
if ( logger.enabled ) {
|
||||
|
|
Loading…
Reference in New Issue