diff --git a/public/app.mjs b/public/app.mjs index 3538310..5147632 100644 --- a/public/app.mjs +++ b/public/app.mjs @@ -424,8 +424,8 @@ function make_entry_row(entry, children_map) { return row; } -function render_tree_node(entry, children_map) { - if (!node_or_descendants_match(entry, children_map)) { return null; } +function render_tree_node(entry, children_map, is_child = false) { + if (!is_child && !node_or_descendants_match(entry, children_map)) { return null; } const children = children_map.get(entry.id) ?? []; const node = document.createElement('div'); @@ -436,8 +436,7 @@ function render_tree_node(entry, children_map) { const children_el = document.createElement('div'); children_el.className = 'task-children'; for (const child of children) { - const child_node = render_tree_node(child, children_map); - if (child_node) { children_el.appendChild(child_node); } + children_el.appendChild(render_tree_node(child, children_map, true)); } node.appendChild(children_el); }