Skip to content

Commit

Permalink
fix: fix type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
baetheus committed Mar 19, 2024
1 parent 206b55f commit f0354db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/dux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ export function asyncReducerFactory<P, R, E, S>(
caseFn(action.pending, pipe(lens, O.modify(D.toLoading))),
caseFn(
action.success,
(s, a) => pipe(lens, O.replace(DE.success(a.value.result)))(s),
(s, { result }) => pipe(lens, O.replace(DE.success(result)))(s),
),
caseFn(
action.failure,
(s, a) => pipe(lens, O.replace(DE.failure(a.value.error)))(s),
(s, { error }) => pipe(lens, O.replace(DE.failure(error)))(s),
),
);
}
Expand Down

0 comments on commit f0354db

Please sign in to comment.