diff --git a/src/functions/demux.ts b/src/functions/demux.ts index 25e16bd..cd287dd 100644 --- a/src/functions/demux.ts +++ b/src/functions/demux.ts @@ -60,8 +60,8 @@ class Demux extends Writable { (this.streamsByKey[destKey] as any).pipe(this.destination); } } - const writeRes = this.streamsByKey[destKey].write(chunk, encoding); - if (!writeRes) { + + if (!this.streamsByKey[destKey].write(chunk, encoding)) { this.streamsByKey[destKey].once("drain", () => { cb(); });