diff --git a/js/clockIn.js b/js/clockIn.js index 78a058a..b4f35c1 100644 --- a/js/clockIn.js +++ b/js/clockIn.js @@ -210,22 +210,19 @@ function printErrores(errores) { } function ifIsEmpty(value) { - if (value.trim().length === 0) { - return "hide"; - } else { - return "show"; - } + if (!value.trim()) return "hide"; + return "show"; + } function ifIsEmptyImage(value) { - if (value.trim().length === 0) { - return "img/in.svg"; - } else { - return "img/" + value + ".svg"; - } + if (!value.trim()) return "img/in.svg"; + return "img/" + value + ".svg"; + } -function ifIsEmptyText(value = 0) { +function ifIsEmptyText(value) { + if (!value.toString().trim()) return "00:00"; return value; }