1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-06-29 01:03:32 +02:00

Fix :matches-prop() operator when no value provided

This commit is contained in:
Raymond Hill 2024-06-20 09:21:43 -04:00
parent aaceabeba1
commit 47b985a056
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -188,7 +188,11 @@ class PSelectorMatchesPropTask extends PSelectorTask {
if ( value === null ) { return; }
value = value[prop];
}
if ( this.reValue !== null && this.reValue.test(value) === false ) { return; }
if ( this.reValue === null ) {
if ( value === undefined ) { return; }
} else if ( this.reValue.test(value) === false ) {
return;
}
output.push(node);
}
}