From a47f225bf93a11ddf3ffc44230ec9f1df600411c Mon Sep 17 00:00:00 2001 From: VPS 4 Builder Date: Thu, 14 May 2026 20:12:36 +0200 Subject: [PATCH] =?UTF-8?q?fix(lancar-gto):=20corrigir=20crash=20.map=20?= =?UTF-8?q?=E2=80=94=20getPacientes=20retorna=20{data,total}=20n=C3=A3o=20?= =?UTF-8?q?array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/views/LancarGTO.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/views/LancarGTO.tsx b/frontend/views/LancarGTO.tsx index 9da1404..eb5d63a 100644 --- a/frontend/views/LancarGTO.tsx +++ b/frontend/views/LancarGTO.tsx @@ -105,10 +105,10 @@ export const LancarGTO: React.FC = () => { const d = await HybridBackend.getDentistas(); const es = await HybridBackend.getEspecialidades(); const pr = await HybridBackend.getProcedimentos(); - setPacientes(p); - setDentistas(d); - setEspecialidades(es); - setProcedimentos(pr); + setPacientes(Array.isArray(p) ? p : (p?.data ?? [])); + setDentistas(d ?? []); + setEspecialidades(es ?? []); + setProcedimentos(pr ?? []); }; load(); }, []);