Skip to content

Commit aee3ae7

Browse files
committed
docs: Fix import/export example bug
1 parent e2a1128 commit aee3ae7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/storybooks/__snapshots__/storyshots.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -3222,15 +3222,15 @@ exports[`Storyshots Basics treeData import/export 1`] = `
32223222
, name:
32233223
N3
32243224
, parent:
3225-
3
3225+
2
32263226
</li>
32273227
<li>
32283228
id:
32293229
4
32303230
, name:
32313231
N4
32323232
, parent:
3233-
4
3233+
3
32343234
</li>
32353235
</ul>
32363236
</div>

examples/storybooks/tree-data-io.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default class App extends Component {
3535
}).map(({ node, path }) => ({
3636
id: node.id,
3737
name: node.name,
38-
parent: path.length > 1 ? path[path.length - 1] : null,
38+
parent: path.length > 1 ? path[path.length - 2] : null,
3939
}));
4040

4141
return (

0 commit comments

Comments
 (0)