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 30, 2024
1 parent a837886 commit 5975965
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 5975965

Please sign in to comment.