diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-06-01 16:28:24 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-06-01 16:28:24 +0900 |
| commit | 2c0b10b0ee77e27bd1498bd457248686c30a45e4 (patch) | |
| tree | b2f724aed958a0b6810b71b0d0a06ce1388cdae0 /packages/frontend/src/scripts | |
| parent | :art: (diff) | |
| download | sharkey-2c0b10b0ee77e27bd1498bd457248686c30a45e4.tar.gz sharkey-2c0b10b0ee77e27bd1498bd457248686c30a45e4.tar.bz2 sharkey-2c0b10b0ee77e27bd1498bd457248686c30a45e4.zip | |
refactor
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/emojilist.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/scripts/emojilist.ts b/packages/frontend/src/scripts/emojilist.ts index 3f63e6b214..79661b7ce9 100644 --- a/packages/frontend/src/scripts/emojilist.ts +++ b/packages/frontend/src/scripts/emojilist.ts @@ -30,10 +30,10 @@ for (let i = 0; i < emojilist.length; i++) { export const emojiCharByCategory = _charGroupByCategory; -export function getEmojiName(char: string): string | undefined { +export function getEmojiName(char: string): string | null { const idx = _indexByChar.get(char); - if (typeof idx === 'undefined') { - return undefined; + if (idx == null) { + return null; } else { return emojilist[idx].name; } |