mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-03 19:53:09 +02:00
refactor
This commit is contained in:
parent
6c09361ec6
commit
2c0b10b0ee
1 changed files with 3 additions and 3 deletions
|
@ -30,10 +30,10 @@ for (let i = 0; i < emojilist.length; i++) {
|
||||||
|
|
||||||
export const emojiCharByCategory = _charGroupByCategory;
|
export const emojiCharByCategory = _charGroupByCategory;
|
||||||
|
|
||||||
export function getEmojiName(char: string): string | undefined {
|
export function getEmojiName(char: string): string | null {
|
||||||
const idx = _indexByChar.get(char);
|
const idx = _indexByChar.get(char);
|
||||||
if (typeof idx === 'undefined') {
|
if (idx == null) {
|
||||||
return undefined;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return emojilist[idx].name;
|
return emojilist[idx].name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue