Closed rpominov closed 9 years ago
Not sure if I found a bug, or doing something wrong myself.
Following example doesn't work correctly. If ran in node it prints 1 but the node process doesn't terminates, which probably means that Bacon.interval(100, 2) still working.
1
Bacon.interval(100, 2)
Bacon = require('baconjs'); Bacon.once(1).merge(Bacon.interval(100, 2)).subscribe(function(event) { console.log(event); return Bacon.noMore; });
If we take two events everything works just fine:
Bacon = require('baconjs'); var count = 0; Bacon.once(1).merge(Bacon.interval(100, 2)).subscribe(function(event) { console.log(event); return count++ === 1 ? Bacon.noMore : Bacon.more; });
Thanks @pozadi, a good find! Easily fixable too.
Thanks :+1:
Not sure if I found a bug, or doing something wrong myself.
Following example doesn't work correctly. If ran in node it prints
1
but the node process doesn't terminates, which probably means thatBacon.interval(100, 2)
still working.If we take two events everything works just fine: