From 56b8201196a02e4d6c31bce7c168ad1c961ed63e Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 23 Mar 2023 14:57:31 -0400 Subject: [PATCH] Ensure astSelectorsFromSelectorList receive expected arguments Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2554 --- src/js/static-filtering-parser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 8c1bacdde..8844d544c 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -3348,6 +3348,7 @@ class ExtSelectorCompiler { } astSelectorsFromSelectorList(args) { + if ( Array.isArray(args) === false ) { return; } if ( args.length < 3 ) { return; } if ( args[0].data instanceof Object === false ) { return; } if ( args[0].data.type !== 'SelectorList' ) { return; }