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