Skip to content

Commit c860e2a

Browse files
committed
Filter out wrong data
1 parent e94585f commit c860e2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/BaseMarkdownEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type MarkdownEditorProps = {
2727
onSetPreview: ?boolean => void,
2828
}
2929

30-
3130
class MarkdownEditor extends React.Component<MarkdownEditorProps> {
3231
static defaultProps = {
3332
value: '',
@@ -136,6 +135,7 @@ class MarkdownEditor extends React.Component<MarkdownEditorProps> {
136135
':': {
137136
dataProvider: token => emoji(token)
138137
.slice(0, 10)
138+
.filter(({char}) => char !== null)
139139
.map(({ name, char, keywords }) => ({ name, char, keywords })),
140140
component: AutocompleteItem,
141141
output: item => ({ text: item.char, caretPosition: 'next' }),

0 commit comments

Comments
 (0)