Skip to content

Commit

Permalink
fix(vx-network): Wrap Links + Nodes in a Fragment, not an empty g
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Williams committed Sep 24, 2019
1 parent 63b69c8 commit 3d1ed5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/vx-network/src/Links.tsx
Expand Up @@ -17,12 +17,12 @@ export type LinkProps<Link> = {

export default function Links<Link>({ links = [], linkComponent, className }: LinkProps<Link>) {
return (
<Group>
<>
{links.map((link, i) => (
<Group key={`network-link-${i}`} className={cx('vx-network-link', className)}>
{React.createElement(linkComponent, { link })}
</Group>
))}
</Group>
</>
);
}
4 changes: 2 additions & 2 deletions packages/vx-network/src/Nodes.tsx
Expand Up @@ -29,7 +29,7 @@ export default function Nodes<Node>({
y = (d: any) => (d && d.y) || 0,
}: NodeProps<Node>) {
return (
<Group>
<>
{nodes.map((node, i) => (
<Group
key={`network-node-${i}`}
Expand All @@ -40,6 +40,6 @@ export default function Nodes<Node>({
{React.createElement(nodeComponent, { node })}
</Group>
))}
</Group>
</>
);
}

0 comments on commit 3d1ed5a

Please sign in to comment.