Fix crash when sending :invalid_emoji:
This commit is contained in:
parent
04796e56d1
commit
36319d6458
1 changed files with 5 additions and 1 deletions
|
@ -159,7 +159,11 @@
|
|||
return str.replace(emoji.rx_colons, function(m){
|
||||
var idx = m.substr(1, m.length-2);
|
||||
var val = emoji.map.colons[idx];
|
||||
return emoji.data[val][0][0];
|
||||
if (val) {
|
||||
return emoji.data[val][0][0];
|
||||
} else {
|
||||
return m;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue