Be sure procedural filterer is present before use

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2407
This commit is contained in:
Raymond Hill 2022-12-14 08:56:04 -05:00
parent 8c64c3c6ac
commit d77331f73a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 7 additions and 4 deletions

View File

@ -659,12 +659,15 @@ vAPI.DOMFilterer = class {
...this.proceduralFilterer.selectors.values() ...this.proceduralFilterer.selectors.values()
); );
} }
const proceduralFilterer = this.proceduralFiltererInstance();
if ( proceduralFilterer !== null ) {
for ( const json of this.convertedProceduralFilters ) { for ( const json of this.convertedProceduralFilters ) {
out.procedural.push( out.procedural.push(
this.proceduralFiltererInstance().createProceduralFilter(json) proceduralFilterer.createProceduralFilter(json)
); );
} }
} }
}
return out; return out;
} }