Skip to content

Commit 5305e0a

Browse files
author
Syaiful Bahri
committed
update FFI for tryTakeVar and tryPeekVar
1 parent 496d181 commit 5305e0a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Control/Monad/Aff/Internal.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ exports._tryTakeVar = function (nothing, just, nonCanceler, avar) {
3131
error(avar.error);
3232
} else if (avar.producers.length > 0) {
3333
avar.producers.shift()(function (x) {
34-
success(just(x));
35-
return nonCanceler;
34+
return success(just(x));
3635
}, error);
3736
} else {
3837
success(nothing);
@@ -60,8 +59,7 @@ exports._tryPeekVar = function (nothing, just, nonCanceler, avar) {
6059
error(avar.error);
6160
} else if (avar.producers.length > 0) {
6261
avar.producers[0](function (x) {
63-
success(just(x));
64-
return nonCanceler;
62+
return success(just(x));
6563
}, error);
6664
} else {
6765
success(nothing);

0 commit comments

Comments
 (0)