Fix search results for “-” not returning “-1” since 996c46cd
parent
b149e37aad
commit
b00572dfaf
|
@ -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++
|
||||
|
||||
|
|
Loading…
Reference in New Issue