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
1 changed files with 5 additions and 1 deletions

View File

@ -488,7 +488,11 @@ const conversation = {
return this.statusMap[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
},
parentOrSelf (id) {