-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
The crash
The following snippet (tested on 3.7.0) leads to a crash:
const EmojiConvertor = require('emoji-js')
var emoji = new EmojiConvertor()
emoji.colons_mode = true
emoji.replace_unified(`🧑🏻🤝🧑🏼`)
Uncaught TypeError: Cannot read properties of undefined (reading '3')
at emoji.replacement (/Users/damien/Developer/Git/xxx/xxx/node_modules/emoji-js/lib/emoji.js:369:50)
at emoji.replacement (/Users/damien/Developer/Git/xxx/xxx/node_modules/emoji-js/lib/emoji.js:363:17)
at /Users/damien/Developer/Git/xxx/xxx/node_modules/emoji-js/lib/emoji.js:306:17
at String.replace (<anonymous>)
at emoji.replace_unified (/Users/damien/Developer/Git/xxx/xxx/node_modules/emoji-js/lib/emoji.js:284:14)
https://emojipedia.org/people-holding-hands/
As far as I can tell, any gender-neutral variations using skin tone modifiers leads to the crash .
The conversion issue
This one is, I assume a mapping issue(?), but it seems like gender-neutral versions of some single-person emoji are converted into :woman-*
instead of :person-*
.
A few examples:
> emoji.replace_unified(`🙅`)
':woman-gesturing-no:'
> emoji.replace_unified(`🙎`)
':woman-pouting:'
Metadata
Metadata
Assignees
Labels
No labels