sorting done, ready to review

This commit is contained in:
Clemens 2016-06-07 11:22:52 +02:00
parent fa3ad2382b
commit dbbda03020
2 changed files with 5 additions and 7 deletions

View File

@ -4900,12 +4900,10 @@ var sortedRemove = function sortedRemove(list, sortFn, item) {
};
function sortedIndexOf(list, value, sortFn) {
if (sortFn === false) {
var i = 0;
while (i < list.length && list[i].id !== value.id) {
i++;
}
return i;
if (!sortFn) {
sortFn = function sortFn(x) {
return 0;
}; // This triggers the linear search for flows that have the same sort value.
}
var low = 0,

View File

@ -37,7 +37,7 @@ function makeSortFn(sort){
let sortKeyFun = column.sortKeyFun;
if (sort.sortDesc) {
sortKeyFun = function () {
sortKeyFun = sortKeyFun && function () {
const k = column.sortKeyFun.apply(this, arguments);
return _.isString(k) ? reverseString("" + k) : -k;
};