You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Picker is open and you're hovering of custom emojis, the following error appears in the console (albeit not blocking any important functions).
TypeError: emojiData.short_names is undefined
The stack trace leads to the "preview" component, which I am hiding with display: none because there is no other way to turn it off.
I believe this is because sanitize strips out short_names here:
Though don't quote me on that because I don't really understand that part of the code very well. All I can say is that this is how I insert custom emojis into the index:
// When emojis are loaded, I put them into the index by doing this (which// is counter-intuitive but seems to do the job. You actually have to be careful// to do it this way, because otherwise every search call would insert a new// "Custom" category into the datasetemojiIndex.search('',{custom: buildCustomEmojis(immutableListOfEmojisHere)});// The original data of the emojis is "url" and "shortcode" (e.g. :octocat:), here is// what buildCustomEmojis function doesexportconstbuildCustomEmojis=customEmojis=>{constemojis=[];customEmojis.forEach(emoji=>{constshortcode=emoji.get('shortcode');consturl=emoji.get('url');constname=shortcode.replace(':','');emojis.push({id: name,
name,short_names: [name],text: '',emoticons: [],keywords: [name],imageUrl: url,custom: true,});});returnemojis;};
As you can see, short_names is clearly set on input. Not sure what happens after that.
The text was updated successfully, but these errors were encountered:
When the Picker is open and you're hovering of custom emojis, the following error appears in the console (albeit not blocking any important functions).
The stack trace leads to the "preview" component, which I am hiding with
display: none
because there is no other way to turn it off.I believe this is because sanitize strips out short_names here:
https://github.com/missive/emoji-mart/blob/master/src/utils/index.js#L22-L31
Though don't quote me on that because I don't really understand that part of the code very well. All I can say is that this is how I insert custom emojis into the index:
As you can see, short_names is clearly set on input. Not sure what happens after that.
The text was updated successfully, but these errors were encountered: