Skip to content

Commit

Permalink
stream: micro-optimize writable condition
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed May 29, 2024
1 parent c0c598d commit 1755e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/streams/writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,8 @@ ObjectDefineProperties(Writable.prototype, {
// where the writable side was disabled upon construction.
// Compat. The user might manually disable writable side through
// deprecated setter.
return !!w && w.writable !== false && !w.errored &&
(w[kState] & (kEnding | kEnded | kDestroyed)) === 0;
return !!w && w.writable !== false &&
(w[kState] & (kEnding | kEnded | kDestroyed | kErrored)) === 0;
},
set(val) {
// Backwards compatible.
Expand Down

0 comments on commit 1755e63

Please sign in to comment.