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 authored and addaleax committed May 14, 2018
1 parent 2b6e8cc commit 981a2f7
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 981a2f7

Please sign in to comment.