From a0ce1fb43b51dd7e86493229738f3c24ca08400d Mon Sep 17 00:00:00 2001 From: fede Date: Tue, 27 Oct 2026 17:04:14 -0300 Subject: [PATCH] correjido bug cuando no hay repuestso --- front/src/routes/repuestos/+page.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/routes/repuestos/+page.ts b/front/src/routes/repuestos/+page.ts index cd9d008..7d3dadc 100644 --- a/front/src/routes/repuestos/+page.ts +++ b/front/src/routes/repuestos/+page.ts @@ -9,8 +9,8 @@ export async function load({ fetch, depends }) { if (typeof repuestos === 'string') { error = repuestos; } else { - if (typeof repuestos[0].deleted_at !== 'undefined') - repuestos.forEach((x) => { + if (repuestos.length != 0 && typeof repuestos[0].deleted_at !== 'undefined') + repuestos.forEach((x:any) => { x.deleted_at = x.deleted_at ? '✗' : '✔'; }); }