Skip to content

Commit 9d8cd36

Browse files
committed
Fix for machine errors
1 parent c4e45f4 commit 9d8cd36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/webapp/app/presenters/v3/ApiRunListPresenter.server.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ export const ApiRunListSearchParams = z.object({
123123
}
124124

125125
const parsedValues = values.map((v) => MachinePresetName.safeParse(v));
126-
const invalidValues = parsedValues.filter((result) => !result.success);
126+
const invalidValues: string[] = [];
127+
parsedValues.forEach((result, index) => {
128+
if (!result.success) {
129+
invalidValues.push(values[index]);
130+
}
131+
});
127132
if (invalidValues.length > 0) {
128133
ctx.addIssue({
129134
code: z.ZodIssueCode.custom,

0 commit comments

Comments
 (0)