mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
FIX treeview/util
This commit is contained in:
parent
6820bb7cb0
commit
bbe5d494c1
@ -167,8 +167,9 @@ export const getNext = ({
|
||||
|
||||
const mains = getMainsKeys(dataset);
|
||||
|
||||
const parents = getParents(id, dataset);
|
||||
// .concat([{ children: mains }]);
|
||||
// we add a face super-root, otherwise we won't be able to jump to the next root
|
||||
const superRoot = { children: mains } as Item;
|
||||
const parents = getParents(id, dataset).concat([superRoot]);
|
||||
|
||||
const next = parents.reduce(
|
||||
(acc, item) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user