diff --git a/src/components/picker.js b/src/components/picker.js index dc4214e..3eef099 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -152,7 +152,8 @@ export default class Picker extends React.Component { handleEmojiOver(emoji) { var { preview } = this.refs - const emojiData = CUSTOM_CATEGORY.emojis.find(customEmoji => customEmoji.id === emoji.id) + // Use Array.prototype.find() when it is more widely supported. + const emojiData = CUSTOM_CATEGORY.emojis.filter(customEmoji => customEmoji.id === emoji.id)[0] preview.setState({ emoji: Object.assign(emoji, emojiData) }) clearTimeout(this.leaveTimeout) }