We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 01d3f8f + 7e0385c commit 8a40dbdCopy full SHA for 8a40dbd
lib/ui/src/components/sidebar/utils.ts
@@ -36,7 +36,7 @@ export const getDescendantIds = memoize(1000)(
36
(data: StoriesHash, id: string, skipLeafs: boolean): string[] => {
37
const { children = [] } = data[id] || {};
38
return children.reduce((acc, childId) => {
39
- if (skipLeafs && data[childId].isLeaf) return acc;
+ if (!data[childId] || (skipLeafs && data[childId].isLeaf)) return acc;
40
acc.push(childId, ...getDescendantIds(data, childId, skipLeafs));
41
return acc;
42
}, []);
0 commit comments