ui: Handle number vector flag

This commit is contained in:
nemunaire 2023-12-15 17:18:46 +01:00
parent e611424ba3
commit 0591f81255
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}