Commit 527e7edb authored by Mike Greiling's avatar Mike Greiling

replace emojiAlias references with normalizeEmojiName helper

parent 82d67f70
import installCustomElements from 'document-register-element';
import { emojiMap, emojiAliases, isEmojiUnicodeSupported, getUnicodeSupportMap } from '../emoji';
import { emojiMap, normalizeEmojiName, isEmojiUnicodeSupported, getUnicodeSupportMap } from '../emoji';
installCustomElements(window);
......@@ -10,8 +10,7 @@ function emojiImageTag(name, src) {
}
function assembleFallbackImageSrc(inputName) {
let name = Object.prototype.hasOwnProperty.call(emojiAliases, inputName) ?
emojiAliases[inputName] : inputName;
let name = normalizeEmojiName(inputName);
let emojiInfo = emojiMap[name];
// Fallback to question mark for unknown emojis
if (!emojiInfo) {
......@@ -25,8 +24,7 @@ function assembleFallbackImageSrc(inputName) {
function glEmojiTag(inputName, options) {
const opts = { sprite: false, forceFallback: false, ...options };
let name = Object.prototype.hasOwnProperty.call(emojiAliases, inputName) ?
emojiAliases[inputName] : inputName;
let name = normalizeEmojiName(inputName);
let emojiInfo = emojiMap[name];
// Fallback to question mark for unknown emojis
if (!emojiInfo) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment