another modwatchtoold adjustment
This commit is contained in:
parent
a6083ca45d
commit
a5f8874dc8
|
@ -23,7 +23,9 @@ const keepState = {
|
|||
*/
|
||||
function compare(a, b, asc) {
|
||||
if (typeof a === 'string' && typeof b === 'string') {
|
||||
return a.localeCompare(b);
|
||||
let ret = a.localeCompare(b);
|
||||
if (asc) ret *= -1;
|
||||
return ret;
|
||||
}
|
||||
if (!a || a === 'N/A') a = 0;
|
||||
if (!b || b === 'N/A') b = 0;
|
||||
|
|
|
@ -506,11 +506,11 @@ export function parseInterval(interval) {
|
|||
* }
|
||||
*/
|
||||
export function combineTables(a, b) {
|
||||
let bTable;
|
||||
if (a.columns.length === b.columns.length) {
|
||||
a.rows = a.rows.concat(b.rows);
|
||||
return a;
|
||||
}
|
||||
let bTable;
|
||||
bTable = a;
|
||||
} else {
|
||||
let sTable;
|
||||
if (a.columns.length < b.columns.length) {
|
||||
bTable = b;
|
||||
|
@ -539,6 +539,10 @@ export function combineTables(a, b) {
|
|||
}
|
||||
}
|
||||
bTable.rows = bTable.rows.concat(newRows);
|
||||
}
|
||||
if (bTable.columns[0] === 'rid') {
|
||||
bTable.rows.forEach((row, i) => { row[0] = i; });
|
||||
}
|
||||
return bTable;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user