Element hiding filters shown as OTHER in developer tools panel
Environment
- OS version: Ubuntu 22.04
- Browser version: Chrome 121
- Extension version: Adblock Plus 3.24.1
- Last working version: Adblock Plus 3.24
Steps to reproduce
- Add custom filter
abptestpages.org##body
- Navigate to abptestpages.org.
- Open developer tools panel and reload page.
Observed behavior
Filter hit is shown with type "OTHER".
Expected behavior
Filter hit is shown with type "ELEMHIDE".
Further information
This regression was introduced by #1592 (closed), due to changes in the toSerializableBlockableItem()
function that were made to conform with the "@typescript-eslint/strict-boolean-expressions" ESLint rule. Previously, the filter
variable was checked for being falsey whereas now it is mistakenly checked for being a string, despite it usually being an object.
See code change.
Edited by Thomas Greiner