fix: refs #6656 fix ifisemptytext
gitea/worker-time-control/pipeline/head This commit looks good Details

This commit is contained in:
jorgep 2024-01-12 16:09:56 +01:00
parent 21720b7b27
commit 948be76654
1 changed files with 8 additions and 11 deletions

View File

@ -210,22 +210,19 @@ function printErrores(errores) {
} }
function ifIsEmpty(value) { function ifIsEmpty(value) {
if (value.trim().length === 0) { if (!value.trim()) return "hide";
return "hide";
} else {
return "show"; return "show";
}
} }
function ifIsEmptyImage(value) { function ifIsEmptyImage(value) {
if (value.trim().length === 0) { if (!value.trim()) return "img/in.svg";
return "img/in.svg";
} else {
return "img/" + value + ".svg"; return "img/" + value + ".svg";
}
} }
function ifIsEmptyText(value = 0) { function ifIsEmptyText(value) {
if (!value.toString().trim()) return "00:00";
return value; return value;
} }