We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb70d19 commit 82a0810Copy full SHA for 82a0810
src/Effect/Aff.js
@@ -475,8 +475,12 @@ var Aff = function () {
475
// bracket count is non-zero then we are in a masked state so it's
476
// impossible to be killed.
477
if (interrupt && interrupt !== tmp && bracketCount === 0) {
478
- step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
479
- } else if (fail) {
+ if (step == null || util.isLeft(step)) {
+ step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
480
+ } else {
481
+ step = attempt._1.completed(util.fromRight(step))(attempt._2);
482
+ }
483
+ } else if (fail) {
484
step = attempt._1.failed(util.fromLeft(fail))(attempt._2);
485
} else {
486
step = attempt._1.completed(util.fromRight(step))(attempt._2);
0 commit comments