Skip to content

Commit 82a0810

Browse files
author
Felix Schlitter
committed
Sketch up (still defunct) solution to problem
1 parent bb70d19 commit 82a0810

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Effect/Aff.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,12 @@ var Aff = function () {
475475
// bracket count is non-zero then we are in a masked state so it's
476476
// impossible to be killed.
477477
if (interrupt && interrupt !== tmp && bracketCount === 0) {
478-
step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
479-
} else if (fail) {
478+
if (step == null || util.isLeft(step)) {
479+
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) {
480484
step = attempt._1.failed(util.fromLeft(fail))(attempt._2);
481485
} else {
482486
step = attempt._1.completed(util.fromRight(step))(attempt._2);

0 commit comments

Comments
 (0)