mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
provide key to comments
This commit is contained in:
parent
e704cda0fa
commit
9b3c555078
1 changed files with 2 additions and 1 deletions
|
@ -196,11 +196,12 @@ class Comment extends React.Component {
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
<span className="comment-content">
|
<span className="comment-content">
|
||||||
{commentText.map(fragment => {
|
{commentText.map((fragment, index) => {
|
||||||
if (typeof fragment === 'string') {
|
if (typeof fragment === 'string') {
|
||||||
return (
|
return (
|
||||||
<EmojiText
|
<EmojiText
|
||||||
as="span"
|
as="span"
|
||||||
|
key={`comments-${id}-fragment-${index}`}
|
||||||
text={fragment}
|
text={fragment}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue