Skip to content

Commit d02651c

Browse files
orgadsmarco-ippolito
authored andcommitted
stream: micro-optimize writable condition
PR-URL: #53189 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 09e2191 commit d02651c

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)