Guard sanitize() against undefined `short_names`
This is important when hovering over a custom emoji while searching.nolan/hinaloe-test
parent
153998ca2c
commit
346e398d6e
|
@ -16,7 +16,7 @@ function unifiedToNative(unified) {
|
||||||
|
|
||||||
function sanitize(emoji) {
|
function sanitize(emoji) {
|
||||||
var { name, short_names, skin_tone, skin_variations, emoticons, unified, custom, imageUrl } = emoji,
|
var { name, short_names, skin_tone, skin_variations, emoticons, unified, custom, imageUrl } = emoji,
|
||||||
id = short_names[0],
|
id = emoji.id || short_names[0],
|
||||||
colons = `:${id}:`
|
colons = `:${id}:`
|
||||||
|
|
||||||
if (custom) {
|
if (custom) {
|
||||||
|
|
Loading…
Reference in New Issue