fix: accepter city/title null dans le schéma Zod Cesium+
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
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 <noreply@anthropic.com>
This commit is contained in:
@@ -83,8 +83,8 @@ function countryCodeFromCity(city: string): string {
|
|||||||
const HitSchema = z.object({
|
const HitSchema = z.object({
|
||||||
_id: z.string(),
|
_id: z.string(),
|
||||||
_source: z.object({
|
_source: z.object({
|
||||||
title: z.string().optional(),
|
title: z.string().nullable().optional(),
|
||||||
city: z.string().optional(),
|
city: z.string().nullable().optional(),
|
||||||
geoPoint: z.unknown().optional(),
|
geoPoint: z.unknown().optional(),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user