Commit 2b32985
authored
stream: use null for the error argument
When no error occurs, use `null` instead of `undefined` for the `error`
argument of the `writable.write()` and `writable.end()` callbacks.
Fixes: #44290
PR-URL: #44312
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>1 parent 8e87299 commit 2b32985Copy full SHA for 2b32985
File tree
Expand file treeCollapse file tree
3 files changed
+14
-7
lines changedOpen diff view settings
Filter options
- lib/internal/streams
- test/parallel
Expand file treeCollapse file tree
3 files changed
+14
-7
lines changedOpen diff view settings
Collapse file
lib/internal/streams/writable.js
Copy file name to clipboardExpand all lines: lib/internal/streams/writable.js+5-3Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
497 | 497 | |
498 | 498 | |
499 | 499 | |
500 | | - |
| 500 | + |
501 | 501 | |
502 | 502 | |
503 | 503 | |
| ||
640 | 640 | |
641 | 641 | |
642 | 642 | |
643 | | - |
| 643 | + |
644 | 644 | |
| 645 | + |
| 646 | + |
645 | 647 | |
646 | 648 | |
647 | 649 | |
| ||
742 | 744 | |
743 | 745 | |
744 | 746 | |
745 | | - |
| 747 | + |
746 | 748 | |
747 | 749 | |
748 | 750 | |
|
Collapse file
test/parallel/test-stream-writable-end-cb-error.js
Copy file name to clipboardExpand all lines: test/parallel/test-stream-writable-end-cb-error.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | | - |
| 39 | + |
40 | 40 | |
41 | 41 | |
42 | 42 | |
|
Collapse file
test/parallel/test-stream2-writable.js
Copy file name to clipboardExpand all lines: test/parallel/test-stream2-writable.js+8-3Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
194 | 194 | |
195 | 195 | |
196 | 196 | |
197 | | - |
| 197 | + |
| 198 | + |
198 | 199 | |
199 | 200 | |
200 | 201 | |
| ||
225 | 226 | |
226 | 227 | |
227 | 228 | |
228 | | - |
| 229 | + |
| 230 | + |
| 231 | + |
229 | 232 | |
230 | 233 | |
231 | 234 | |
232 | 235 | |
233 | 236 | |
234 | 237 | |
235 | 238 | |
236 | | - |
| 239 | + |
| 240 | + |
| 241 | + |
237 | 242 | |
238 | 243 | |
239 | 244 | |
|
0 commit comments