diff --git a/src/components/emoji.js b/src/components/emoji.js index 95cba546f..efe091d7b 100644 --- a/src/components/emoji.js +++ b/src/components/emoji.js @@ -61,7 +61,9 @@ const Emoji = props => { } let data = _getData(props) - if (!data) { return null } + if (!data) { + return null + } let { unified, custom, short_names, imageUrl } = data, style = {}, diff --git a/src/components/picker.js b/src/components/picker.js index fe9be6996..2d1de18bd 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -11,7 +11,12 @@ import { deepMerge, measureScrollbar } from '../utils' import { Anchors, Category, Emoji, Preview, Search } from '.' const RECENT_CATEGORY = { id: 'recent', name: 'Recent', emojis: null } -const SEARCH_CATEGORY = { id: 'search', name: 'Search', emojis: null, anchor: false } +const SEARCH_CATEGORY = { + id: 'search', + name: 'Search', + emojis: null, + anchor: false, +} const CUSTOM_CATEGORY = { id: 'custom', name: 'Custom', emojis: [] } const I18N = { @@ -465,7 +470,9 @@ export default class Picker extends React.PureComponent { i18n={this.i18n} recent={category.id == RECENT_CATEGORY.id ? recent : undefined} custom={ - category.id == RECENT_CATEGORY.id ? CUSTOM_CATEGORY.emojis : undefined + category.id == RECENT_CATEGORY.id + ? CUSTOM_CATEGORY.emojis + : undefined } emojiProps={{ native: native, diff --git a/src/utils/emoji-index.js b/src/utils/emoji-index.js index b2c3446f4..bf02d2f46 100644 --- a/src/utils/emoji-index.js +++ b/src/utils/emoji-index.js @@ -66,13 +66,9 @@ function search( data.categories.forEach(category => { let isIncluded = - include && include.length - ? include.indexOf(category.id) > -1 - : true + include && include.length ? include.indexOf(category.id) > -1 : true let isExcluded = - exclude && exclude.length - ? exclude.indexOf(category.id) > -1 - : false + exclude && exclude.length ? exclude.indexOf(category.id) > -1 : false if (!isIncluded || isExcluded) { return }