Skip to content

Commit

Permalink
stream: simplify Writable.prototype.cork()
Browse files Browse the repository at this point in the history
This commit removes an unnecessary intermediate variable.

PR-URL: #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>
  • Loading branch information
cjihrig committed May 14, 2018
1 parent 2d4dd10 commit faa2dae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit faa2dae

Please sign in to comment.