Add a lil check to shadow handling
This commit is contained in:
Vendored
+8
-1
@@ -91,9 +91,16 @@ function mergeShadow(
|
|||||||
repostCount = Math.max(0, repostCount)
|
repostCount = Math.max(0, repostCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shadow.embed !== undefined && post.embed) {
|
if ('embed' in shadow) {
|
||||||
|
if (
|
||||||
|
(AppBskyEmbedRecord.isView(post.embed) &&
|
||||||
|
AppBskyEmbedRecord.isView(shadow.embed)) ||
|
||||||
|
(AppBskyEmbedRecordWithMedia.isView(post.embed) &&
|
||||||
|
AppBskyEmbedRecordWithMedia.isView(shadow.embed))
|
||||||
|
) {
|
||||||
post.embed = shadow.embed
|
post.embed = shadow.embed
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return castAsShadow({
|
return castAsShadow({
|
||||||
...post,
|
...post,
|
||||||
|
|||||||
Reference in New Issue
Block a user