diff --git a/app/routes/play/settings.tsx b/app/routes/play/settings.tsx index ca4b0e54d..ca9d5a5b0 100644 --- a/app/routes/play/settings.tsx +++ b/app/routes/play/settings.tsx @@ -51,7 +51,10 @@ const settingsActionSchema = z.object({ safeJSONParse, z.array(z.enum(weapons)).max(LFG_WEAPON_POOL_MAX_LENGTH) ), - friendCode: z.preprocess(falsyToNull, z.string().regex(friendCodeRegExp)), + friendCode: z.preprocess( + falsyToNull, + z.string().regex(friendCodeRegExp).nullable() + ), }); export const action: ActionFunction = async ({ request, context }) => {