schnee effeckt und fehler Korektur
This commit is contained in:
14
node_modules/readable-stream/lib/_stream_writable.js
generated
vendored
14
node_modules/readable-stream/lib/_stream_writable.js
generated
vendored
@@ -81,7 +81,7 @@ var Stream = require('./internal/streams/stream');
|
||||
/*<replacement>*/
|
||||
|
||||
var Buffer = require('safe-buffer').Buffer;
|
||||
var OurUint8Array = global.Uint8Array || function () {};
|
||||
var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
|
||||
function _uint8ArrayToBuffer(chunk) {
|
||||
return Buffer.from(chunk);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ Writable.prototype.uncork = function () {
|
||||
if (state.corked) {
|
||||
state.corked--;
|
||||
|
||||
if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
|
||||
if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -591,7 +591,7 @@ Writable.prototype.end = function (chunk, encoding, cb) {
|
||||
}
|
||||
|
||||
// ignore unnecessary end() calls.
|
||||
if (!state.ending && !state.finished) endWritable(this, state, cb);
|
||||
if (!state.ending) endWritable(this, state, cb);
|
||||
};
|
||||
|
||||
function needFinish(state) {
|
||||
@@ -652,11 +652,9 @@ function onCorkedFinish(corkReq, state, err) {
|
||||
cb(err);
|
||||
entry = entry.next;
|
||||
}
|
||||
if (state.corkedRequestsFree) {
|
||||
state.corkedRequestsFree.next = corkReq;
|
||||
} else {
|
||||
state.corkedRequestsFree = corkReq;
|
||||
}
|
||||
|
||||
// reuse the free corkReq.
|
||||
state.corkedRequestsFree.next = corkReq;
|
||||
}
|
||||
|
||||
Object.defineProperty(Writable.prototype, 'destroyed', {
|
||||
|
||||
Reference in New Issue
Block a user