From 48f9edbd8fb5d83fb77be4c1939fe4ba54e4d63f Mon Sep 17 00:00:00 2001 From: Rene Date: Thu, 30 May 2024 22:12:47 +0300 Subject: [PATCH] Binary stream corruption fix --- lib/dest/write-contents/write-stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dest/write-contents/write-stream.js b/lib/dest/write-contents/write-stream.js index 84e03584..0a373d07 100644 --- a/lib/dest/write-contents/write-stream.js +++ b/lib/dest/write-contents/write-stream.js @@ -31,7 +31,7 @@ function writeStream(file, optResolver, onWritten) { // TODO: should this use a clone? var streams = [file.contents]; - if (encoding && encoding.enc !== DEFAULT_ENCODING) { + if (encoding && codec.enc !== DEFAULT_ENCODING) { streams.push(getCodec(DEFAULT_ENCODING).decodeStream()); streams.push(codec.encodeStream()); }