stream: simplify Writable.prototype.cork()
This commit removes an unnecessary intermediate variable. PR-URL: https://github.com/nodejs/node/pull/20697 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
2d4dd10829
commit
faa2daed6c
@ -299,9 +299,7 @@ Writable.prototype.write = function(chunk, encoding, cb) {
|
||||
};
|
||||
|
||||
Writable.prototype.cork = function() {
|
||||
var state = this._writableState;
|
||||
|
||||
state.corked++;
|
||||
this._writableState.corked++;
|
||||
};
|
||||
|
||||
Writable.prototype.uncork = function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user