diff --git a/src/components/category.js b/src/components/category.js index 86208eb..9a8dd43 100644 --- a/src/components/category.js +++ b/src/components/category.js @@ -101,18 +101,20 @@ export default class Category extends React.Component { let frequentlyUsed = recent || frequently.get(perLine) if (frequentlyUsed.length) { - emojis = frequentlyUsed.map(id => { - const emoji = custom.filter(e => e.id === id)[0] - if (emoji) { - return emoji - } + emojis = frequentlyUsed + .map(id => { + const emoji = custom.filter(e => e.id === id)[0] + if (emoji) { + return emoji + } - return id - }).filter(id => !!getData(id)) + return id + }) + .filter(id => !!getData(id)) } if (emojis.length === 0 && frequentlyUsed.length > 0) { - return null; + return null } } diff --git a/src/components/picker.js b/src/components/picker.js index afcc8f6..53672bb 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -465,9 +465,7 @@ export default class Picker extends React.PureComponent { native={native} hasStickyPosition={this.hasStickyPosition} i18n={this.i18n} - recent={ - category.name == 'Recent' ? recent : undefined - } + recent={category.name == 'Recent' ? recent : undefined} custom={ category.name == 'Recent' ? CUSTOM_CATEGORY.emojis : undefined }