mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-02 00:59:38 +02:00
Properly handle converted procedural filters in logger
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2624
This commit is contained in:
parent
a3b74cd25e
commit
5fd35ffb3c
@ -663,9 +663,9 @@ vAPI.DOMFilterer = class {
|
||||
const proceduralFilterer = this.proceduralFiltererInstance();
|
||||
if ( proceduralFilterer !== null ) {
|
||||
for ( const json of this.convertedProceduralFilters ) {
|
||||
out.procedural.push(
|
||||
proceduralFilterer.createProceduralFilter(json)
|
||||
);
|
||||
const pfilter = proceduralFilterer.createProceduralFilter(json);
|
||||
pfilter.converted = true;
|
||||
out.procedural.push(pfilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -141,16 +141,18 @@ const processDeclarativeComplex = function(out) {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
const processProcedural = function(out) {
|
||||
function processProcedural(out) {
|
||||
if ( proceduralDict.size === 0 ) { return; }
|
||||
for ( const [ raw, pselector ] of proceduralDict ) {
|
||||
if ( pselector.hit === false && pselector.exec().length === 0 ) {
|
||||
if ( pselector.converted ) {
|
||||
if ( safeQuerySelector(pselector.selector) === null ) { continue; }
|
||||
} else if ( pselector.hit === false && pselector.exec().length === 0 ) {
|
||||
continue;
|
||||
}
|
||||
out.push(`##${raw}`);
|
||||
proceduralDict.delete(raw);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user