Add emoji name fallback (#658)
This commit is contained in:
parent
0ca1df24ed
commit
06a4e0c93b
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
import emojisData from 'emojibase-data/en/compact.json';
|
import emojisData from 'emojibase-data/en/compact.json';
|
||||||
import shortcodes from 'emojibase-data/en/shortcodes/joypixels.json';
|
import joypixels from 'emojibase-data/en/shortcodes/joypixels.json';
|
||||||
|
import emojibase from 'emojibase-data/en/shortcodes/emojibase.json';
|
||||||
|
|
||||||
const emojiGroups = [{
|
const emojiGroups = [{
|
||||||
name: 'Smileys & people',
|
name: 'Smileys & people',
|
||||||
|
@ -52,7 +53,7 @@ function addToGroup(emoji) {
|
||||||
|
|
||||||
const emojis = [];
|
const emojis = [];
|
||||||
emojisData.forEach((emoji) => {
|
emojisData.forEach((emoji) => {
|
||||||
const myShortCodes = shortcodes[emoji.hexcode];
|
const myShortCodes = joypixels[emoji.hexcode] || emojibase[emoji.hexcode];
|
||||||
if (!myShortCodes) return;
|
if (!myShortCodes) return;
|
||||||
const em = {
|
const em = {
|
||||||
...emoji,
|
...emoji,
|
||||||
|
|
Loading…
Reference in a new issue