From 196fb6d396e6713a11b4bb495bbc67bfb4dcfe05 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 13 Nov 2023 19:12:23 +0100 Subject: [PATCH] fix(core): update --- test/assets/writabletext.txt | 38 +++++++++++++++++++++++++++ ts/00_commitinfo_data.ts | 2 +- ts/smartstream.classes.smartduplex.ts | 4 +-- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/test/assets/writabletext.txt b/test/assets/writabletext.txt index 413e9db..e922c03 100644 --- a/test/assets/writabletext.txt +++ b/test/assets/writabletext.txt @@ -10,3 +10,41 @@ hi+wow hi+wow hi+wow hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow +hi+wow diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index fed5dfe..a07fdea 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartstream', - version: '3.0.24', + version: '3.0.25', description: 'simplifies access to node streams' } diff --git a/ts/smartstream.classes.smartduplex.ts b/ts/smartstream.classes.smartduplex.ts index efbe9c7..2dec39e 100644 --- a/ts/smartstream.classes.smartduplex.ts +++ b/ts/smartstream.classes.smartduplex.ts @@ -59,9 +59,7 @@ export class SmartDuplex extends Duplex { let canPushMore = true; while(this.backpressuredArray.data.length > 0 && canPushMore) { const nextChunk = this.backpressuredArray.shift(); - if (nextChunk) { - canPushMore = this.push(nextChunk); - } + canPushMore = this.push(nextChunk); } }