ui: Handle number vector flag
This commit is contained in:
parent
e611424ba3
commit
0591f81255
@ -74,7 +74,7 @@
|
||||
// Remove empty cells
|
||||
if (!flag.nb_lines) {
|
||||
for (let i = v.length - 1; i > 0; i--) {
|
||||
if (!v[i].length) {
|
||||
if (v[i] === null || !String(v[i]).length) {
|
||||
v.splice(i, 1);
|
||||
}
|
||||
}
|
||||
@ -83,8 +83,8 @@
|
||||
// Sort cells (case doesn't count in sort)
|
||||
if (flag.ignore_order) {
|
||||
v = v.sort((a,b) => {
|
||||
const aUC = a.toUpperCase();
|
||||
const bUC = b.toUpperCase();
|
||||
const aUC = String(a).toUpperCase();
|
||||
const bUC = String(b).toUpperCase();
|
||||
if (aUC < bUC) {
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user