We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1b7c3 commit e9a8b81Copy full SHA for e9a8b81
1 file changed
lib/internal/streams/new/pull.js
@@ -285,14 +285,14 @@ function* applyStatelessSyncTransform(source, transform) {
285
*/
286
function* applyStatefulSyncTransform(source, transform) {
287
const output = transform(source);
288
- const batch = [];
289
for (const item of output) {
+ const batch = [];
290
for (const chunk of flattenTransformYieldSync(item)) {
291
ArrayPrototypePush(batch, chunk);
292
}
293
- }
294
- if (batch.length > 0) {
295
- yield batch;
+ if (batch.length > 0) {
+ yield batch;
+ }
296
297
298
0 commit comments