summaryrefslogtreecommitdiff
path: root/lib/_stream_writable.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-05-12 23:25:21 -0400
committercjihrig <cjihrig@gmail.com>2018-05-14 13:25:01 -0400
commitfaa2daed6c2430336267a1bad675abf2585edd84 (patch)
tree4528d2113635beaadd198414a410e5cd3bac2802 /lib/_stream_writable.js
parent2d4dd108296d327b874492fbd55ebbe00d003ef4 (diff)
downloadandroid-node-v8-faa2daed6c2430336267a1bad675abf2585edd84.tar.gz
android-node-v8-faa2daed6c2430336267a1bad675abf2585edd84.tar.bz2
android-node-v8-faa2daed6c2430336267a1bad675abf2585edd84.zip
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>
Diffstat (limited to 'lib/_stream_writable.js')
-rw-r--r--lib/_stream_writable.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
index fff47a703f..3df14206f1 100644
--- a/lib/_stream_writable.js
+++ b/lib/_stream_writable.js
@@ -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() {