Fix search results for “-” not returning “-1” since 996c46cd

nolan/hinaloe-test
Etienne Lemay 2017-05-01 11:28:15 +02:00
parent b149e37aad
commit b00572dfaf
1 changed files with 4 additions and 4 deletions

View File

@ -28,6 +28,10 @@ function search(value, { emojisToShowFilter, maxResults, include, exclude } = {}
pool = data.emojis
if (value.length) {
if (value == '-' || value == '-1') {
return [emojisList['-1']]
}
var values = value.toLowerCase().split(/[\s|,|\-|_]+/),
allResults = []
@ -54,10 +58,6 @@ function search(value, { emojisToShowFilter, maxResults, include, exclude } = {}
aIndex = index,
length = 0
if (value == '-' || value == '-1') {
return [emojisList['-1']]
}
for (let char of value.split('')) {
length++