mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
Fix to only set nodes prop when nodesFlat is provided
This commit is contained in:
parent
87102776ab
commit
c41a776405
4 changed files with 25 additions and 4 deletions
|
@ -268,7 +268,9 @@
|
|||
}, []);
|
||||
}
|
||||
|
||||
$: nodes = createNestedArray(nodesFlat);
|
||||
$: if (nodesFlat.length > 0) {
|
||||
nodes = createNestedArray(nodesFlat);
|
||||
}
|
||||
$: flattenedNodes = traverse(nodes);
|
||||
$: nodeIds = flattenedNodes.map((node) => node.id);
|
||||
$: activeNodeId.set(activeId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue