Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a4cc0fb

Browse filesBrowse files
陈刚MylesBorins
authored andcommitted
stream: delete unused code
In implementation of `stream.Writable`, `writable._write()` is always called with a callback that is `_writableState.onwrite()`. And In `afterTransform()`, `ts.writechunk` and `ts.writecb` are assigned to null. So, `ts.writecb` is a true value if `ts.writechunk` isn't null. PR-URL: #18278 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 9af1e4b commit a4cc0fb
Copy full SHA for a4cc0fb

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/_stream_transform.js‎

Copy file name to clipboardExpand all lines: lib/_stream_transform.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Transform.prototype._write = function(chunk, encoding, cb) {
180180
Transform.prototype._read = function(n) {
181181
var ts = this._transformState;
182182

183-
if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
183+
if (ts.writechunk !== null && !ts.transforming) {
184184
ts.transforming = true;
185185
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
186186
} else {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.