FIX potential bug in post-thread
This commit is contained in:
@@ -329,8 +329,7 @@ function responseToThreadNodes(
|
|||||||
): ThreadNode {
|
): ThreadNode {
|
||||||
if (
|
if (
|
||||||
AppBskyFeedDefs.isThreadViewPost(node) &&
|
AppBskyFeedDefs.isThreadViewPost(node) &&
|
||||||
AppBskyFeedPost.isRecord(node.post.record) &&
|
AppBskyFeedPost.isValidRecord(node.post.record)
|
||||||
AppBskyFeedPost.validateRecord(node.post.record).success
|
|
||||||
) {
|
) {
|
||||||
const post = node.post
|
const post = node.post
|
||||||
// These should normally be present. They're missing only for
|
// These should normally be present. They're missing only for
|
||||||
@@ -360,7 +359,7 @@ function responseToThreadNodes(
|
|||||||
depth,
|
depth,
|
||||||
isHighlightedPost: depth === 0,
|
isHighlightedPost: depth === 0,
|
||||||
hasMore:
|
hasMore:
|
||||||
direction === 'down' && !node.replies?.length && !!node.replyCount,
|
direction === 'down' && !node.replies?.length && !!post.replyCount,
|
||||||
isSelfThread: false, // populated `annotateSelfThread`
|
isSelfThread: false, // populated `annotateSelfThread`
|
||||||
hasMoreSelfThread: false, // populated in `annotateSelfThread`
|
hasMoreSelfThread: false, // populated in `annotateSelfThread`
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user