Use POJO instead of MessageModel in ConversationView quote logic
This commit is contained in:
parent
c9b1ce6655
commit
6b2dfeb9f5
8 changed files with 92 additions and 119 deletions
|
@ -2831,7 +2831,13 @@ export class ConversationModel extends window.Backbone
|
|||
return null;
|
||||
}
|
||||
|
||||
return number.error || 'Invalid phone number';
|
||||
let errorMessage: undefined | string;
|
||||
if (number.error instanceof Error) {
|
||||
errorMessage = number.error.message;
|
||||
} else if (typeof number.error === 'string') {
|
||||
errorMessage = number.error;
|
||||
}
|
||||
return errorMessage || 'Invalid phone number';
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue