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