This commit is contained in:
Dmitry Vasilev
2023-01-17 15:29:57 +08:00
parent af3ec4548e
commit 32b294c879

View File

@@ -294,11 +294,14 @@ export const path_to_root = (root, child) => {
} }
export const is_expandable = node => export const is_expandable = node =>
// Hosted node always can be expanded, even if has not children is_native_fn(node)
// Toplevel cannot be expanded if has no children ? (node.children != null && node.children.length != 0)
(!is_native_fn(node) && !node.toplevel) || node.has_more_children
|| // Hosted node always can be expanded, even if has not children
(node.children != null || node.has_more_children) // Toplevel cannot be expanded if has no children
: node.toplevel
? (node.children != null && node.children.length != 0)
: true
/* /*
Right - Right -