corejavascript / corejavascript/typeahead.js
bug in the intersect function
Open
bug
- Dominant language
- JavaScript
- Stars
- 968
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
There is a small bug in the getIntersection function used for filtering results: the two input arrays don't get sorted correctly if arrays contain numeric values as javascript sort function sorts alphabetically. This will affect searches involving multiple tokens.
I suggest sorting array like this
`.sort((a, b) => (a - b));`
Contributor guide
Assessment
This issue has not been assessed yet.