We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49c5a3d commit 9516431Copy full SHA for 9516431
src/defaultProps.js
@@ -32,11 +32,11 @@ export default {
32
},
33
defaultSortMethod: (a, b) => {
34
// force null and undefined to the bottom
35
- a = (a === null || a === undefined) ? -Infinity : a
36
- b = (b === null || b === undefined) ? -Infinity : b
+ a = (a === null || a === undefined) ? '' : a
+ b = (b === null || b === undefined) ? '' : b
37
// force any string values to lowercase
38
- a = a === 'string' ? a.toLowerCase() : a
39
- b = b === 'string' ? b.toLowerCase() : b
+ a = typeof a === 'string' ? a.toLowerCase() : a
+ b = typeof b === 'string' ? b.toLowerCase() : b
40
// Return either 1 or -1 to indicate a sort priority
41
if (a > b) {
42
return 1
0 commit comments