Skip to content

Commit

Permalink
🐛 Fix react warning on key errors for text
Browse files Browse the repository at this point in the history
See #260
  • Loading branch information
rowanc1 committed Nov 14, 2023
1 parent d812cf3 commit 8809753
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/myst-to-react/src/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import type * as spec from 'myst-spec';
import { HashLink } from './heading.js';
import type { NodeRenderer } from '@myst-theme/providers';
Expand Down Expand Up @@ -90,10 +91,10 @@ const BASIC_RENDERERS: BasicNodeRenderers = {
return (
<>
{text.map((v, i) => (
<>
<React.Fragment key={i}>
{v}
{i < text.length - 1 && <wbr />}
</>
</React.Fragment>
))}
</>
);
Expand Down

0 comments on commit 8809753

Please sign in to comment.