File tree Expand file tree Collapse file tree
apps/web/src/features/upload Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,21 +142,21 @@ export function getZodTypeName(schema: z.ZodTypeAny, isOptional?: boolean): ZodT
142142 return interpretZodArray ( schema , def . typeName , isOptional ) ;
143143 } else if ( isZodSetDef ( def ) ) {
144144 const innerDef = def . valueType . _def as AnyZodTypeDef ;
145-
145+
146146 if ( ! isZodTypeDef ( innerDef ) ) {
147147 return {
148148 message : 'Invalid inner type: ZodSet value type must have a valid type definition' ,
149149 success : false
150150 } ;
151151 }
152-
152+
153153 if ( ! isZodEnumDef ( innerDef ) ) {
154154 return {
155155 message : 'Invalid inner type: ZodSet value type must be a ZodEnum' ,
156156 success : false
157157 } ;
158158 }
159-
159+
160160 return {
161161 enumValues : innerDef . values ,
162162 isOptional : Boolean ( isOptional ) ,
@@ -348,8 +348,8 @@ function generateSampleData({
348348 const enumString = enumValues . join ( '/' ) ;
349349 const possibleEnumOutputs = `SET(${ enumString } , ...)` ;
350350 return formatTypeInfo ( possibleEnumOutputs , isOptional ) ;
351- } catch ( error ) {
352- throw new Error ( `Failed to generate sample data for ZodSet: ${ error . message } ` ) ;
351+ } catch {
352+ throw new Error ( `Failed to generate sample data for ZodSet` ) ;
353353 }
354354
355355 case 'ZodString' :
You can’t perform that action at this time.
0 commit comments