From d4cc4fbd3ae3c60162a9c190de315f36bb107069 Mon Sep 17 00:00:00 2001 From: syoul Date: Mon, 23 Mar 2026 21:36:47 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20accepter=20city/title=20null=20dans=20le?= =?UTF-8?q?=20sch=C3=A9ma=20Zod=20Cesium+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Un profil Cesium+ (clé 2QsNk...) a city:null. La contrainte .string().optional() accepte undefined mais pas null → ZodError silencieux dans resolveGeoByKeys → geoMap vide → 0 transactions affichées en mode 30 jours. Correction : .string().nullable().optional() pour title et city. Co-Authored-By: Claude Sonnet 4.6 --- src/services/adapters/CesiumAdapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/adapters/CesiumAdapter.ts b/src/services/adapters/CesiumAdapter.ts index 2e67109..a2257d7 100644 --- a/src/services/adapters/CesiumAdapter.ts +++ b/src/services/adapters/CesiumAdapter.ts @@ -83,8 +83,8 @@ function countryCodeFromCity(city: string): string { const HitSchema = z.object({ _id: z.string(), _source: z.object({ - title: z.string().optional(), - city: z.string().optional(), + title: z.string().nullable().optional(), + city: z.string().nullable().optional(), geoPoint: z.unknown().optional(), }), });