Skip to content

Commit 7c66b27

Browse files
orgadsRafaelGSS
authored andcommittedJun 7, 2024
stream: micro-optimize writable condition
PR-URL: #53189 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 1d59345 commit 7c66b27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/internal/streams/writable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,8 @@ ObjectDefineProperties(Writable.prototype, {
10051005
// where the writable side was disabled upon construction.
10061006
// Compat. The user might manually disable writable side through
10071007
// deprecated setter.
1008-
return !!w && w.writable !== false && !w.errored &&
1009-
(w[kState] & (kEnding | kEnded | kDestroyed)) === 0;
1008+
return !!w && w.writable !== false &&
1009+
(w[kState] & (kEnding | kEnded | kDestroyed | kErrored)) === 0;
10101010
},
10111011
set(val) {
10121012
// Backwards compatible.

0 commit comments

Comments
 (0)
Please sign in to comment.