Skip to content

Commit

Permalink
Sketch up (still defunct) solution to problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Schlitter committed May 21, 2019
1 parent bb70d19 commit 82a0810
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Effect/Aff.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,12 @@ var Aff = function () {
// bracket count is non-zero then we are in a masked state so it's
// impossible to be killed.
if (interrupt && interrupt !== tmp && bracketCount === 0) {
step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
} else if (fail) {
if (step == null || util.isLeft(step)) {
step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
} else {
step = attempt._1.completed(util.fromRight(step))(attempt._2);
}
} else if (fail) {
step = attempt._1.failed(util.fromLeft(fail))(attempt._2);
} else {
step = attempt._1.completed(util.fromRight(step))(attempt._2);
Expand Down

0 comments on commit 82a0810

Please sign in to comment.