Mirror: 🎩 A tiny but capable push & pull stream library for TypeScript and Flow
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix trampoline logic for share and makeTrampoline helper

+3 -2
+2 -2
src/callbag.re
··· 135 135 Hashtbl.add(state.sinks, id, sink); 136 136 state.idCounter = state.idCounter + 1; 137 137 138 - if (state.idCounter === 1) { 138 + if (id === 0) { 139 139 source(signal => { 140 140 switch (signal) { 141 141 | Push(_) when !state.ended => { 142 - Hashtbl.iter((_, sink) => sink(signal), state.sinks); 143 142 state.gotSignal = false; 143 + Hashtbl.iter((_, sink) => sink(signal), state.sinks); 144 144 } 145 145 | Start(x) => state.talkback = x 146 146 | End => state.ended = true
+1
src/callbag_helpers.re
··· 30 30 let rec explode = () => 31 31 switch ([@bs] f()) { 32 32 | Some(x) => { 33 + state.gotSignal = false; 33 34 sink(Push(x)); 34 35 if (state.gotSignal) explode(); 35 36 }