Skip to content

Commit

Permalink
Don’t use optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLem committed Jan 23, 2023
1 parent bd20ee3 commit a5da67a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/emoji-mart/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ async function _init(props) {
category.emojis.splice(emojiIndex, 1)
}

if (!emoji || props.exceptEmojis?.includes(emoji.id)) {
if (
!emoji ||
(props.exceptEmojis && props.exceptEmojis.includes(emoji.id))
) {
ignore()
continue
}
Expand Down

0 comments on commit a5da67a

Please sign in to comment.