diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-27 12:30:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 12:30:41 -0800 |
commit | cd43adf698bbe01d9dd1cd873aa16589e480b88c (patch) | |
tree | e8ad8ee6759d843b10468bf387e022e9f38df3a3 /src/lib/api | |
parent | 1dc017367edf08352284cb9a2e0d5b75d5d93691 (diff) | |
download | voidsky-cd43adf698bbe01d9dd1cd873aa16589e480b88c.tar.zst |
Two fixes to react-key generation (#2004)
* Fix missing react keys in ListMembers * Fix react key construction for the posts feed
Diffstat (limited to 'src/lib/api')
-rw-r--r-- | src/lib/api/feed-manip.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts index 7dfc9258a..912302d0a 100644 --- a/src/lib/api/feed-manip.ts +++ b/src/lib/api/feed-manip.ts @@ -19,8 +19,9 @@ export class FeedViewPostsSlice { constructor(public items: FeedViewPost[] = []) {} get _reactKey() { - return `slice-${this.items[0].post.uri}-${ - this.items[0].reason?.indexedAt || this.items[0].post.indexedAt + const rootItem = this.isFlattenedReply ? this.items[1] : this.items[0] + return `slice-${rootItem.post.uri}-${ + rootItem.reason?.indexedAt || rootItem.post.indexedAt }` } |