Closed anatoljevich closed 6 years ago
Having the same issue since the last update. All image paths are broken.
Found a way to fix this behaviour. You have to manually set the emoji size before the shortNameToImage function is executed, example:
// Manually set the size
emojione.emojiSize = 32;
var convertThis = ':smile:';
var converted = emojione.shortNameToImage(convertThis);
This has been fixed in 3.1.6. The logic wasn't quite right with the ternary conditional as pointed out by @anatoljevich when no emoji size or image path is set.
In version 3.1.5 I'm getting the link https://cdn.jsdelivr.net/emojione/assets/3.1/png/1f497.png
while it should be https://cdn.jsdelivr.net/emojione/assets/3.1/png/32/1f497.png
It was working fine in version 3.1.2. I think there is a problem with a 'shortNameToImage' function ePath = (ns.emojiSize !== '32') ? ns.defaultPathPNG + ns.emojiSize + '/' : ns.imagePathPNG;