Nothing can come after action operator in procedural cosmetic filters

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2760
This commit is contained in:
Raymond Hill 2023-08-09 08:26:35 -04:00
parent b4ffd16db6
commit a3a2ac5ec0
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -3479,11 +3479,11 @@ class ExtSelectorCompiler {
const prelude = []; const prelude = [];
const tasks = []; const tasks = [];
for ( const part of parts ) { for ( const part of parts ) {
if ( out.action !== undefined ) { return; }
const { data } = part; const { data } = part;
switch ( data.type ) { switch ( data.type ) {
case 'ActionSelector': { case 'ActionSelector': {
if ( details.noaction ) { return; } if ( details.noaction ) { return; }
if ( out.action !== undefined ) { return; }
if ( prelude.length !== 0 ) { if ( prelude.length !== 0 ) {
if ( tasks.length === 0 ) { if ( tasks.length === 0 ) {
out.selector = prelude.join(''); out.selector = prelude.join('');