Skip to content

Commit 550a1f7

Browse files
atkawa7tannerlinsley
authored andcommitted
Fix default sorting documentation (TanStack#270)
1 parent 42e1a12 commit 550a1f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,8 @@ defaultSortMethod = (a, b) => {
821821
a = (a === null || a === undefined) ? -Infinity : a
822822
b = (b === null || b === undefined) ? -Infinity : b
823823
// force any string values to lowercase
824-
a = a === 'string' ? a.toLowerCase() : a
825-
b = b === 'string' ? b.toLowerCase() : b
824+
a = typeof a === 'string' ? a.toLowerCase() : a
825+
b = typeof b === 'string' ? b.toLowerCase() : b
826826
// Return either 1 or -1 to indicate a sort priority
827827
if (a > b) {
828828
return 1

0 commit comments

Comments
 (0)