Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
stream: micro-optimize writable condition
  • Loading branch information
orgads committed May 30, 2024
commit a66dd43f7520effab3b359e757e39b44c827aa0a
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