Skip to content

Commit e7abdeb

Browse files
committed
decode
1 parent 699dbc8 commit e7abdeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vue-components/src/components/OmegaForm/useOmegaForm.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ export const useOmegaForm = <
711711
try {
712712
// Note: Partial schemas don't have .make() method yet (https://github.com/Effect-TS/effect/issues/4222)
713713
if ("make" in schema && typeof (schema as any).make === "function") {
714-
return (schema as any).make(defaultValues, { disableValidation: true })
714+
const decoded = (schema as any).make(defaultValues, { disableValidation: true })
715+
return S.encodeSync(schema.pipe(S.partial))(decoded)
715716
}
716717
} catch (error) {
717718
console.warn("Could not extract schema constructor defaults:", error)

0 commit comments

Comments
 (0)