Hotfix: For old Plausible installs enabled in an EventType, give a default value (#6860)
* Add default for trackingId for old plausible installs in event-types * Fix typespull/6877/head
parent
9b26c7aee6
commit
75509c97fd
|
@ -4,7 +4,9 @@ import { eventTypeAppCardZod } from "../eventTypeAppCardZod";
|
|||
|
||||
export const appDataSchema = eventTypeAppCardZod.merge(
|
||||
z.object({
|
||||
trackingId: z.string(),
|
||||
// FIXME: Due to some reason autogenerated zod schema at prisma/zod/eventtype.ts fails typecheck on using `.default()`. It somehow thinks that trackingId can be undefined
|
||||
// z.lazy has something to do with it. Figure it out later.
|
||||
trackingId: z.string().default("") as unknown as z.ZodString,
|
||||
})
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue