Skip to content

Commit

Permalink
fix: rankedItem casting to string (#64) (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
samyan authored and Kent C. Dodds committed Jun 13, 2019
1 parent 9888015 commit 48768dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function sortRankedItems(a, b) {
const same = aRank === bRank
if (same) {
if (aKeyIndex === bKeyIndex) {
return aRankedItem.localeCompare(bRankedItem)
return String(aRankedItem).localeCompare(bRankedItem)
} else {
return aKeyIndex < bKeyIndex ? aFirst : bFirst
}
Expand Down

0 comments on commit 48768dd

Please sign in to comment.