Slice search results only when necessary

release
Etienne Lemay 2017-04-18 10:28:44 -04:00
parent 4a9497df0e
commit 6a3b05d85e
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ function search(value, emojisToShowFilter = () => true, maxResults = 75) {
results = results.filter((result) => emojisToShowFilter(data.emojis[result.id].unified))
}
if (results && results.length) {
if (results && results.length > maxResults) {
results = results.slice(0, maxResults)
}
}