From 04fead8d8a3be75e4e3ad3d7c5795d047adbbdce Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 5 Mar 2024 08:02:55 -0500 Subject: [PATCH] Group lists with unknown group to special section Related issue: https://old.reddit.com/r/uBlockOrigin/comments/1b6tad0 --- src/js/3p-filters.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/3p-filters.js b/src/js/3p-filters.js index 7ad5fadc1..b37bc18e3 100644 --- a/src/js/3p-filters.js +++ b/src/js/3p-filters.js @@ -229,6 +229,7 @@ const renderFilterLists = ( ) => { 'social', 'annoyances', 'regions', + 'unknown', 'custom' ]; for ( const key of groupKeys ) { @@ -238,9 +239,11 @@ const renderFilterLists = ( ) => { }; } for ( const [ listkey, listDetails ] of Object.entries(response.available) ) { - const groupkey = listDetails.group; + let groupkey = listDetails.group; + if ( listTree.hasOwnProperty(groupkey) === false ) { + groupkey = 'unknown'; + } const groupDetails = listTree[groupkey]; - if ( groupDetails === undefined ) { continue; } if ( listDetails.parent !== undefined ) { let lists = groupDetails.lists; for ( const parent of listDetails.parent.split('|') ) {