Skip to content

Commit

Permalink
fix: transform empty string also in the crm messages script
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviareichl committed Oct 2, 2024
1 parent 69a7de1 commit bcdfc5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/generate-crm-locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ import type { paths } from "@/lib/api-client/api";

const schema = v.object({
NUXT_PUBLIC_DATABASE: v.optional(v.picklist(["enabled", "disabled"]), "enabled"),
NUXT_PUBLIC_API_BASE_URL: v.optional(v.pipe(v.string(), v.url())),
NUXT_PUBLIC_API_BASE_URL: v.pipe(
v.unknown(),
v.transform((v) => {
return v === "" ? undefined : v;
}),
v.optional(v.pipe(v.string(), v.url())),
),
});

interface Translations {
Expand Down

0 comments on commit bcdfc5c

Please sign in to comment.