Intersect search results [Fix #131]
parent
b0e1d44d6e
commit
57cc2ea4a5
|
@ -1,5 +1,5 @@
|
|||
import data from '../data'
|
||||
import { getData, getSanitizedData, uniq } from '.'
|
||||
import { getData, getSanitizedData, intersect } from '.'
|
||||
|
||||
var originalPool = {}
|
||||
var index = {}
|
||||
|
@ -130,7 +130,7 @@ function search(value, { emojisToShowFilter, maxResults, include, exclude, custo
|
|||
}).filter(a => a)
|
||||
|
||||
if (allResults.length > 1) {
|
||||
results = uniq(allResults)
|
||||
results = intersect.apply(null, allResults)
|
||||
} else if (allResults.length) {
|
||||
results = allResults[0]
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue