@@ -150,10 +150,12 @@ export const make = Effect.fnUntraced(function* <A, I = A, R = never, TER = neve
|
||||
const validationFiberLens = Lens.fromSubscriptionRef(yield* SubscriptionRef.make(Option.none<Fiber.Fiber<A, ParseResult.ParseError>>()))
|
||||
const isCommittingLens = Lens.fromSubscriptionRef(yield* SubscriptionRef.make(false))
|
||||
|
||||
const initialEncodedValue = options.initialEncodedValue ?? (yield* Effect.flatMap(
|
||||
Lens.get(options.target),
|
||||
Schema.encode(options.schema, { errors: "all" }),
|
||||
))
|
||||
const initialEncodedValue = options.initialEncodedValue !== undefined
|
||||
? options.initialEncodedValue
|
||||
: yield* Effect.flatMap(
|
||||
Lens.get(options.target),
|
||||
Schema.encode(options.schema, { errors: "all" }),
|
||||
)
|
||||
|
||||
return new SynchronizedFormImpl(
|
||||
options.schema,
|
||||
|
||||
Reference in New Issue
Block a user