Skip to content

Commit c175338

Browse files
committed
Removed redundant line. Sort using numeric value even if string
1 parent fc87874 commit c175338

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/array/ksort.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ function ksort (inputArr, sort_flags) {
3737
break;
3838
case 'SORT_NUMERIC': // compare items numerically
3939
sorter = function (a, b) {
40-
return (a - b);
40+
return ((a+0) - (b+0));
4141
};
4242
break;
43-
case 'SORT_REGULAR': // compare items normally (don't change types)
43+
// case 'SORT_REGULAR': // compare items normally (don't change types)
4444
default:
4545
sorter = function (a, b) {
4646
if (a > b) {

0 commit comments

Comments
 (0)