Skip to content

Commit 4a65f85

Browse files
authored
fix(typebox): errors iteration (#537)
1 parent 4c62160 commit 4a65f85

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mangle.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"mangle": {
3+
"regex": "^_"
4+
}
5+
}

typebox/src/typebox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const parseErrorSchema = (
4040

4141
export const typeboxResolver: Resolver =
4242
(schema) => async (values, _, options) => {
43-
const errors = [...Value.Errors(schema, values)];
43+
const errors = Array.from(Value.Errors(schema, values));
4444

4545
options.shouldUseNativeValidation && validateFieldsNatively({}, options);
4646

0 commit comments

Comments
 (0)