Browse Source

fix: uniq key for Fragment

closed-social-glitch-2
欧醚 1 year ago
parent
commit
af35a02def
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/javascript/flavours/glitch/components/status_with_comments.jsx

+ 2
- 2
app/javascript/flavours/glitch/components/status_with_comments.jsx View File

@ -55,7 +55,7 @@ class StatusWithComments extends ImmutablePureComponent {
{childrenWithGrandchildren
.filter((_, idx) => showAll || idx < N)
.map(({ cid, grandchildrenIds }) => (
<>
<React.Fragment key={cid}>
<StatusContainer
key={`comment-${cid}`}
id={cid}
@ -73,7 +73,7 @@ class StatusWithComments extends ImmutablePureComponent {
{!showAll && grandchildrenIds.size > N && loadMore}
</div>
)}
</>
</React.Fragment>
))}
{!showAll && childrenWithGrandchildren.size > N && loadMore}
</div>

Loading…
Cancel
Save