Fix crash when sending :invalid_emoji:

This commit is contained in:
lilia 2015-03-12 11:03:11 -07:00
parent 04796e56d1
commit 36319d6458

View file

@ -159,7 +159,11 @@
return str.replace(emoji.rx_colons, function(m){ return str.replace(emoji.rx_colons, function(m){
var idx = m.substr(1, m.length-2); var idx = m.substr(1, m.length-2);
var val = emoji.map.colons[idx]; var val = emoji.map.colons[idx];
if (val) {
return emoji.data[val][0][0]; return emoji.data[val][0][0];
} else {
return m;
}
}); });
} }
}); });