Ensure astSelectorsFromSelectorList receive expected arguments

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2554
This commit is contained in:
Raymond Hill 2023-03-23 14:57:31 -04:00
parent 6f0ab28258
commit 56b8201196
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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; }