null checks added
This commit is contained in:
parent
674060ed93
commit
19395f3c3c
2 changed files with 9 additions and 9 deletions
|
@ -4,5 +4,5 @@
|
|||
* @param {Array<string>} emojis The list of emojis to check for
|
||||
*/
|
||||
export const containsEmoji = (content: { msgtype: string, body: string }, emojis: Array<string>): boolean => {
|
||||
return emojis.some((emoji) => content.body.includes(emoji));
|
||||
return emojis.some((emoji) => content.body && content.body.includes(emoji));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue