From 9524c9e3f3cdfe3563cda772c824a487dbad9771 Mon Sep 17 00:00:00 2001 From: Naiel <109038805+naielv@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:13:50 +0200 Subject: [PATCH] fix --- src/page/materiales.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/page/materiales.js b/src/page/materiales.js index 16d78c7..fbcb7ba 100644 --- a/src/page/materiales.js +++ b/src/page/materiales.js @@ -161,17 +161,19 @@ PAGES.materiales = { } const optionExists = Array.from(select.options).some(opt => opt.value === ubicacion); - if (optionExists) return; - - const option = document.createElement("option"); - option.value = ubicacion; - option.textContent = ubicacion; - select.appendChild(option); + if (!optionExists) { + const option = document.createElement("option"); + option.value = ubicacion; + option.textContent = ubicacion; + select.appendChild(option); + } } if (typeof data === "string") { TS_decrypt(data, SECRET, (dec) => { - if (dec) addUbicacion(dec); + if (dec && typeof dec === "object") { + addUbicacion(dec); + } }); } else { addUbicacion(data); @@ -181,6 +183,7 @@ PAGES.materiales = { } }); + // Función para renderizar la tabla filtrada function renderTable(filtroUbicacion) { TS_IndexElement(