Closed cateiru closed 1 year ago
https://github.com/ealush/emoji-picker-react/blob/f5240a58a3aff969374c2ba67a77b7feaa19d141/src/dataUtils/asEmoji.ts#L3-L5
In this implementation, even if the emoji is undefined, it is coerced to the DataEmoji type. The return value is given as an argument to the emojiNames function, and if it is undefined or null, it can cause unexpected errors.
https://github.com/ealush/emoji-picker-react/blob/master/src/dataUtils/emojiSelectors.ts#L18-L20
The issue https://github.com/ealush/emoji-picker-react/issues/298 is presumed to be an example caused by that problem.
Should be fixed thanks to @cateiru
Thank you for merging :bow: This issue has been resolved and will be closed.
https://github.com/ealush/emoji-picker-react/blob/f5240a58a3aff969374c2ba67a77b7feaa19d141/src/dataUtils/asEmoji.ts#L3-L5
In this implementation, even if the emoji is undefined, it is coerced to the DataEmoji type. The return value is given as an argument to the emojiNames function, and if it is undefined or null, it can cause unexpected errors.
https://github.com/ealush/emoji-picker-react/blob/master/src/dataUtils/emojiSelectors.ts#L18-L20
The issue https://github.com/ealush/emoji-picker-react/issues/298 is presumed to be an example caused by that problem.