diff --git a/src/js/background.js b/src/js/background.js index e53bb5a40..4ac91efc3 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -175,8 +175,8 @@ const µBlock = { // jshint ignore:line // Read-only systemSettings: { - compiledMagic: 46, // Increase when compiled format changes - selfieMagic: 46, // Increase when selfie format changes + compiledMagic: 47, // Increase when compiled format changes + selfieMagic: 47, // Increase when selfie format changes }, // https://github.com/uBlockOrigin/uBlock-issues/issues/759#issuecomment-546654501 diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 8219b914c..e0fc68ea8 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -1657,8 +1657,10 @@ Parser.prototype.SelectorCompiler = class { case 'Selector': if ( out.length !== 0 ) { out.push(','); } break; - default: + case 'SelectorList': break; + default: + return; } } return out.join(''); @@ -1697,11 +1699,6 @@ Parser.prototype.SelectorCompiler = class { case 'TypeSelector': prelude.push(this.astSerializePart(part)); break; - case 'Selector': - if ( prelude.length !== 0 ) { - prelude.push(', '); - } - break; case 'ProceduralSelector': if ( prelude.length !== 0 ) { if ( tasks.length === 0 ) { @@ -1715,8 +1712,15 @@ Parser.prototype.SelectorCompiler = class { if ( args === undefined ) { return; } tasks.push([ data.name, args ]); break; - default: + case 'Selector': + if ( prelude.length !== 0 ) { + prelude.push(', '); + } break; + case 'SelectorList': + break; + default: + return; } } if ( tasks.length === 0 && out.action === undefined ) { @@ -1796,6 +1800,7 @@ Parser.prototype.SelectorCompiler = class { if ( Array.isArray(parts) && parts.length !== 0 ) { arg = this.astSerialize(parts); } + if ( arg === undefined ) { return; } switch ( operator ) { case 'has-text': return this.compileText(arg);