getPropsForSearchResult: Harden to missing conversation
This commit is contained in:
parent
9f1304bca8
commit
6aedb30905
3 changed files with 26 additions and 7 deletions
|
@ -199,13 +199,15 @@
|
|||
fromContact.isMe = true;
|
||||
}
|
||||
|
||||
const conversation = this.getConversation();
|
||||
let to = this.findAndFormatContact(conversation.get('id'));
|
||||
if (conversation.isMe()) {
|
||||
const convo = this.getConversation();
|
||||
|
||||
let to = convo ? this.findAndFormatContact(convo.get('id')) : {};
|
||||
|
||||
if (convo && convo.isMe()) {
|
||||
to.isMe = true;
|
||||
} else if (
|
||||
sourceE164 === conversation.get('e164') ||
|
||||
sourceUuid === conversation.get('uuid')
|
||||
(sourceE164 && convo && sourceE164 === convo.get('e164')) ||
|
||||
(sourceUuid && convo && sourceUuid === convo.get('uuid'))
|
||||
) {
|
||||
to = {
|
||||
isMe: true,
|
||||
|
@ -213,7 +215,7 @@
|
|||
}
|
||||
|
||||
return {
|
||||
from: fromContact,
|
||||
from: fromContact || {},
|
||||
to,
|
||||
|
||||
isSelected: this.isSelected,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue