From 14cea53abf55b28227c9a8df26f194e44f143e0f Mon Sep 17 00:00:00 2001 From: Philipp Giese Date: Tue, 21 Jan 2025 16:43:28 +0100 Subject: [PATCH] make threshold optional --- packages/schema/src/routeSchema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/schema/src/routeSchema.ts b/packages/schema/src/routeSchema.ts index 1caa3e97..0cafc44f 100644 --- a/packages/schema/src/routeSchema.ts +++ b/packages/schema/src/routeSchema.ts @@ -48,7 +48,8 @@ const safeSchema = z.object({ .number() .or(z.nan()) .nullable() - .transform((value) => (value == null ? NaN : value)), + .transform((value) => (value == null ? NaN : value)) + .optional(), }) const rolesSchema = z.object({