We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 892e32e commit 2374ebeCopy full SHA for 2374ebe
1 file changed
apps/web/src/features/upload/utils.ts
@@ -364,7 +364,9 @@ export function createUploadTemplateCSV(instrument: AnyUnilingualFormInstrument)
364
const instrumentSchema = instrument.validationSchema as z.AnyZodObject;
365
366
let shape: { [key: string]: z.ZodTypeAny } = {};
367
+ //Todo include ZodEffect as a typename like our other types
368
if ((instrumentSchema._def.typeName as string) === 'ZodEffects') {
369
+ //find a type safe way to call this
370
shape = instrumentSchema._def.schema._def.shape() as { [key: string]: z.ZodTypeAny };
371
} else {
372
shape = instrumentSchema.shape as { [key: string]: z.ZodTypeAny };
0 commit comments