Guard buildSearch() against undefined properties
This is important if custom emojis don’t specify any emoticons, for example.release
parent
15c7b27ba9
commit
2f7d6eb0d8
|
@ -2,6 +2,10 @@ module.exports = data => {
|
|||
const search = []
|
||||
|
||||
var addToSearch = (strings, split) => {
|
||||
if (!strings) {
|
||||
return
|
||||
}
|
||||
|
||||
(Array.isArray(strings) ? strings : [strings]).forEach((string) => {
|
||||
(split ? string.split(/[-|_|\s]+/) : [string]).forEach((s) => {
|
||||
s = s.toLowerCase()
|
||||
|
|
Loading…
Reference in New Issue