Skip to content

Commit

Permalink
fix discard option in Effect.all (#2977)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Jun 11, 2024
1 parent f085f92 commit df4bf4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nervous-houses-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

fix discard option in Effect.all
2 changes: 1 addition & 1 deletion packages/effect/src/internal/fiberRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ export const all = <
return allEither(effects, reconcile, options) as any
}

return reconcile._tag === "Some"
return options?.discard !== true && reconcile._tag === "Some"
? core.map(
forEach(effects, identity, options as any),
reconcile.value
Expand Down

0 comments on commit df4bf4b

Please sign in to comment.