From a31f74325d1dec5e9c197cecf599f0744b6d6319 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 15 Dec 2022 11:20:52 -0500 Subject: [PATCH] Fix "make lint" errors --- src/js/static-filtering-parser.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 1f9ee265c..aad7fea74 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -1759,7 +1759,7 @@ Parser.prototype.SelectorCompiler = class { case 'TypeSelector': prelude.push(this.astSerializePart(part)); break; - case 'ProceduralSelector': + case 'ProceduralSelector': { if ( prelude.length !== 0 ) { let spath = prelude.join(''); prelude.length = 0; @@ -1774,6 +1774,7 @@ Parser.prototype.SelectorCompiler = class { if ( args === undefined ) { return; } tasks.push([ data.name, args ]); break; + } case 'Selector': if ( prelude.length !== 0 ) { prelude.push(', '); @@ -2112,7 +2113,7 @@ Parser.prototype.SelectorCompiler = class { const r = this.unquoteString(s); if ( r.i !== s.length ) { return; } try { - self.document.createExpression(r.s, null); + globalThis.document.createExpression(r.s, null); } catch (e) { return; } @@ -3357,7 +3358,7 @@ Parser.utils = Parser.prototype.utils = (( ) => { if ( match === null ) { break; } switch ( match[1] ) { - case 'if': + case 'if': { let expr = match[2].trim(); const target = expr.charCodeAt(0) === 0x21 /* '!' */; if ( target ) { expr = expr.slice(1); } @@ -3371,7 +3372,8 @@ Parser.utils = Parser.prototype.utils = (( ) => { } stack.push(startDiscard); break; - case 'endif': + } + case 'endif': { stack.pop(); const stopDiscard = shouldDiscard() === false; if ( discard && stopDiscard ) { @@ -3379,6 +3381,7 @@ Parser.utils = Parser.prototype.utils = (( ) => { discard = false; } break; + } default: break; }