[#139977619] fix regression in search with emoji mart picker
parent
1a6e0e0fd3
commit
d3c1ab0828
|
@ -88,7 +88,7 @@ export default class Category extends React.Component {
|
|||
updateDisplay(display) {
|
||||
var emojis = this.getEmojis()
|
||||
|
||||
if (!display && !emojis) {
|
||||
if (!emojis) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -92,10 +92,13 @@ function search(value, emojisToShowFilter = () => true, maxResults = 75) {
|
|||
}
|
||||
}
|
||||
|
||||
let filtered_results = (results || []).filter(
|
||||
(result) => emojisToShowFilter(data.emojis[result.id].unified));
|
||||
if (filtered_results && filtered_results.length) {
|
||||
filtered_results = filtered_results.slice(0, maxResults)
|
||||
let filtered_results = null;
|
||||
if (results) {
|
||||
filtered_results = results.filter(
|
||||
(result) => emojisToShowFilter(data.emojis[result.id].unified));
|
||||
if (filtered_results && filtered_results.length) {
|
||||
filtered_results = filtered_results.slice(0, maxResults)
|
||||
}
|
||||
}
|
||||
|
||||
return filtered_results
|
||||
|
|
Loading…
Reference in New Issue