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); } }