Skip to content

Commit 2374ebe

Browse files
committed
chore: added todos to make solution safer
1 parent 892e32e commit 2374ebe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/web/src/features/upload/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ export function createUploadTemplateCSV(instrument: AnyUnilingualFormInstrument)
364364
const instrumentSchema = instrument.validationSchema as z.AnyZodObject;
365365

366366
let shape: { [key: string]: z.ZodTypeAny } = {};
367+
//Todo include ZodEffect as a typename like our other types
367368
if ((instrumentSchema._def.typeName as string) === 'ZodEffects') {
369+
//find a type safe way to call this
368370
shape = instrumentSchema._def.schema._def.shape() as { [key: string]: z.ZodTypeAny };
369371
} else {
370372
shape = instrumentSchema.shape as { [key: string]: z.ZodTypeAny };

0 commit comments

Comments
 (0)