Skip to content

Commit

Permalink
fix(rhum/v2.x): add key to code
Browse files Browse the repository at this point in the history
Although this doesn't seem to be needed, some elements contain the same keys, so adding the key helps ensure DOM changes
  • Loading branch information
crookse committed May 10, 2022
1 parent 922280b commit 5ddf050
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/markdown/CodeExtended.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export default function CodeExtension({
function renderSingleCodeBlock() {
return (
<code
key={children.toString()}
className={getPrismJsClassNameForCodeBlock(className)}
>
{children}
Expand Down

0 comments on commit 5ddf050

Please sign in to comment.