Fix status undefined in parentOf

This commit is contained in:
Tusooa Zhu 2021-08-07 21:35:52 -04:00
parent 9029344e1f
commit 46feecee70
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]
},
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) {