diff --git a/js/clockIn.js b/js/clockIn.js index 78a058a..748f61f 100644 --- a/js/clockIn.js +++ b/js/clockIn.js @@ -210,23 +210,15 @@ function printErrores(errores) { } function ifIsEmpty(value) { - if (value.trim().length === 0) { - return "hide"; - } else { - return "show"; - } + return value.trim() ? "show" : "hide"; } function ifIsEmptyImage(value) { - if (value.trim().length === 0) { - return "img/in.svg"; - } else { - return "img/" + value + ".svg"; - } + return value.trim() ? `img/${value}.svg` :"img/in.svg"; } -function ifIsEmptyText(value = 0) { - return value; +function ifIsEmptyText(value) { + return value.toString().trim() ? value : "00:00"; } function cerrar(){