Skip to content

Commit 981a2f7

Browse files
cjihrigaddaleax
authored andcommitted
stream: simplify Writable.prototype.cork()
This commit removes an unnecessary intermediate variable. PR-URL: #20697 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 2b6e8cc commit 981a2f7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/_stream_writable.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,7 @@ Writable.prototype.write = function(chunk, encoding, cb) {
299299
};
300300

301301
Writable.prototype.cork = function() {
302-
var state = this._writableState;
303-
304-
state.corked++;
302+
this._writableState.corked++;
305303
};
306304

307305
Writable.prototype.uncork = function() {

0 commit comments

Comments
 (0)