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,10 +659,13 @@ vAPI.DOMFilterer = class {
...this.proceduralFilterer.selectors.values()
);
}
for ( const json of this.convertedProceduralFilters ) {
out.procedural.push(
this.proceduralFiltererInstance().createProceduralFilter(json)
);
const proceduralFilterer = this.proceduralFiltererInstance();
if ( proceduralFilterer !== null ) {
for ( const json of this.convertedProceduralFilters ) {
out.procedural.push(
proceduralFilterer.createProceduralFilter(json)
);
}
}
}
return out;