diff --git a/packages/effect-fc/src/Form.ts b/packages/effect-fc/src/Form.ts index 87f26a8..a44da20 100644 --- a/packages/effect-fc/src/Form.ts +++ b/packages/effect-fc/src/Form.ts @@ -271,22 +271,21 @@ export const makeFormField = , path: P, ): FormField, PropertyPath.ValueFromPath> => { - const _self = self as FormImpl return new FormFieldImpl( - Subscribable.mapEffect(_self.value, Option.match({ + Subscribable.mapEffect(self.value, Option.match({ onSome: v => Option.map(PropertyPath.get(v, path), Option.some), onNone: () => Option.some(Option.none()), })), - SubscriptionSubRef.makeFromPath(_self.encodedValue, path), - Subscribable.mapEffect(_self.error, Option.match({ + SubscriptionSubRef.makeFromPath(self.encodedValue, path), + Subscribable.mapEffect(self.error, Option.match({ onSome: flow( ParseResult.ArrayFormatter.formatError, Effect.map(Array.filter(issue => PropertyPath.equivalence(issue.path, path))), ), onNone: () => Effect.succeed([]), })), - Subscribable.map(_self.validationFiber, Option.isSome), - Subscribable.map(_self.mutation.result, result => Result.isRunning(result) || Result.hasRefreshingFlag(result)), + Subscribable.map(self.validationFiber, Option.isSome), + Subscribable.map(self.mutation.result, result => Result.isRunning(result) || Result.hasRefreshingFlag(result)), ) }