Fix li > li DOM nesting warning

This commit is contained in:
Dan Abramov
2022-04-03 20:22:01 +01:00
parent 80e223a3b8
commit 2398d29f5f

View File

@@ -59,11 +59,13 @@ function FilterListPanel({
onClickCheckbox={() => onSelectFilter(key, matchingKeys)}
color={assignedColor}
/>
{Object.keys(children).length > 0
? Object.entries(children).map((filter) =>
{Object.keys(children).length > 0 ? (
<ul>
{Object.entries(children).map((filter) =>
createNodeComponent(filter, depth + 1)
)
: null}
)}
</ul>
) : null}
</li>
);
}