mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 02:42:41 +01:00
Fix looking-up unexisting sections in "Filter lists" pane
Related feedback: https://old.reddit.com/r/uBlockOrigin/comments/1b6tad0/i_updated_to_the_new_dev_build_1561b10_and_now/
This commit is contained in:
parent
3682eed638
commit
238724eed1
@ -238,8 +238,9 @@ const renderFilterLists = ( ) => {
|
||||
};
|
||||
}
|
||||
for ( const [ listkey, listDetails ] of Object.entries(response.available) ) {
|
||||
let groupKey = listDetails.group;
|
||||
const groupDetails = listTree[groupKey];
|
||||
const groupkey = listDetails.group;
|
||||
const groupDetails = listTree[groupkey];
|
||||
if ( groupDetails === undefined ) { continue; }
|
||||
if ( listDetails.parent !== undefined ) {
|
||||
let lists = groupDetails.lists;
|
||||
for ( const parent of listDetails.parent.split('|') ) {
|
||||
@ -257,8 +258,9 @@ const renderFilterLists = ( ) => {
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/3154#issuecomment-1975413427
|
||||
// Remove empty sections
|
||||
for ( const groupkey of groupKeys ) {
|
||||
const lists = listTree[groupkey].lists;
|
||||
if ( Object.keys(lists).length !== 0 ) { continue; }
|
||||
const groupDetails = listTree[groupkey];
|
||||
if ( groupDetails === undefined ) { continue; }
|
||||
if ( Object.keys(groupDetails.lists).length !== 0 ) { continue; }
|
||||
delete listTree[groupkey];
|
||||
}
|
||||
|
||||
@ -707,7 +709,8 @@ dom.on('.searchbar input', 'input', searchFilterLists);
|
||||
/******************************************************************************/
|
||||
|
||||
const expandedListSet = new Set([
|
||||
'uBlock filters',
|
||||
'cookies',
|
||||
'social',
|
||||
]);
|
||||
|
||||
const listIsExpanded = which => {
|
||||
|
Loading…
Reference in New Issue
Block a user