We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c0a3d2 commit b9562abCopy full SHA for b9562ab
apps/web/src/features/upload/utils.ts
@@ -257,7 +257,11 @@ export function interpretZodValue(
257
case 'ZodSet':
258
if (entry.startsWith('SET(')) {
259
const setData = extractSetEntry(entry);
260
- return { success: true, value: new Set(setData.split(',').map((s) => s.trim())) };
+ const values = setData.split(',').map((s) => s.trim()).filter(Boolean);
261
+ if (values.length === 0) {
262
+ return { message: 'Empty set is not allowed', success: false };
263
+ }
264
+ return { success: true, value: new Set(values) };
265
}
266
return { message: `Invalid ZodSet: ${entry}`, success: false };
267
case 'ZodString':
0 commit comments