remove incorrect early yield

This commit is contained in:
wryk 2020-01-27 17:05:17 +01:00
parent efe384a1f2
commit 5b8e74688d

View File

@ -51,9 +51,10 @@ export async function* observableToAsyncIterator(observable) {
try { try {
while (true) { while (true) {
const value = yield await buffer[0].promise const value = await buffer[0].promise
buffer.unshift() buffer.unshift()
// might cause a early complete because done can be true true when more than one item are in buffer
if (done) { if (done) {
return value return value
} else { } else {