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: Add missing Promise.resolve() tick to toPromise (#131)

authored by

Phil Pluckthun and committed by
GitHub
6c1413a9 6c97ece7

+6 -1
+5
.changeset/eleven-candles-rest.md
··· 1 + --- 2 + 'wonka': patch 3 + --- 4 + 5 + Fix promise timing by adding missing `Promise.resolve()` tick to `toPromise` sink function.
+1 -1
src/sinks.ts
··· 62 62 let value: T | void; 63 63 source(signal => { 64 64 if (signal === SignalKind.End) { 65 - resolve(value!); 65 + Promise.resolve(value!).then(resolve); 66 66 } else if (signal.tag === SignalKind.Start) { 67 67 (talkback = signal[0])(TalkbackKind.Pull); 68 68 } else {