mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
gridster/fix: using comparators in sort methods.
Sort method by default orders alphabetically, but we are sorting numbers and this means that: 40 < 6. And we not expect this result.
This commit is contained in:
@@ -1384,7 +1384,9 @@
|
||||
return true; //break
|
||||
}
|
||||
|
||||
upper_rows[tcol].sort();
|
||||
upper_rows[tcol].sort(function(a, b) {
|
||||
return a - b;
|
||||
});
|
||||
});
|
||||
|
||||
if (!result) { return false; }
|
||||
@@ -1439,7 +1441,9 @@
|
||||
return true; //break
|
||||
}
|
||||
|
||||
upper_rows[tcol].sort();
|
||||
upper_rows[tcol].sort(function(a, b) {
|
||||
return a - b;
|
||||
});
|
||||
});
|
||||
|
||||
if (!result) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user