Handle invalid emoji name in `Emoji` component [Fix #143]

release
Etienne Lemay 2017-11-09 17:04:13 -08:00
parent 8549ebf685
commit 0d18995c3d
1 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,10 @@ const Emoji = props => {
}
}
var { unified, custom, short_names, imageUrl } = _getData(props),
let data = _getData(props)
if (!data) { return null }
let { unified, custom, short_names, imageUrl } = data,
style = {},
children = props.children,
className = 'emoji-mart-emoji',