mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure Readable can start flowing after Writable finish #671
This commit is contained in:
@@ -64,6 +64,12 @@ const _write = function _write (chunk, encoding, callback) {
|
||||
if (Array.isArray(this.options.input.buffer)) {
|
||||
/* istanbul ignore else */
|
||||
if (is.buffer(chunk)) {
|
||||
if (this.options.input.buffer.length === 0) {
|
||||
const that = this;
|
||||
this.on('finish', function () {
|
||||
that.streamInFinished = true;
|
||||
});
|
||||
}
|
||||
this.options.input.buffer.push(chunk);
|
||||
callback();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user