Skip to content

Commit aa6720b

Browse files
committed
chore: remove possible type error
1 parent 87e080b commit aa6720b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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':

0 commit comments

Comments
 (0)