Fix some types
This commit is contained in:
@@ -120,7 +120,7 @@ export function* findAllPostsInQueryData(
|
||||
if (item.subject?.uri === uri) {
|
||||
yield item.subject
|
||||
}
|
||||
const quotedPost = getEmbeddedPost(item.subject.embed)
|
||||
const quotedPost = getEmbeddedPost(item.subject?.embed)
|
||||
if (quotedPost?.uri === uri) {
|
||||
yield embedViewRecordToPostView(quotedPost)
|
||||
}
|
||||
|
||||
@@ -239,7 +239,8 @@ export function* findAllPostsInQueryData(
|
||||
if (item.uri === uri) {
|
||||
yield item
|
||||
}
|
||||
const quotedPost = getEmbeddedPost(item.post.embed)
|
||||
const quotedPost =
|
||||
item.type === 'post' ? getEmbeddedPost(item.post.embed) : undefined
|
||||
if (quotedPost?.uri === uri) {
|
||||
yield embedViewRecordToPlaceholderThread(quotedPost)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user