Fix status undefined in parentOf

This commit is contained in:
Tusooa Zhu 2021-08-07 21:35:52 -04:00
parent f851bc92c9
commit 3addc36c96
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224

View file

@ -488,7 +488,11 @@ const conversation = {
return this.statusMap[id] return this.statusMap[id]
}, },
parentOf (id) { parentOf (id) {
const { in_reply_to_status_id: parentId } = this.statusById(id) const status = this.statusById(id)
if (!status) {
return undefined
}
const { in_reply_to_status_id: parentId } = status
return parentId return parentId
}, },
parentOrSelf (id) { parentOrSelf (id) {