Skip to content

Commit

Permalink
writable: Fix condition mis-translation
Browse files Browse the repository at this point in the history
Amends 35ec931 (stream: writable state bitmap).

Fixes #52228.
  • Loading branch information
orgads committed May 28, 2024
1 parent 067ab06 commit eb34ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/streams/writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ function writeOrBuffer(stream, state, chunk, encoding, callback) {

state.length += len;

if ((state[kState] & (kWriting | kErrored | kCorked | kConstructed)) !== kConstructed) {
if ((state[kState] & (kWriting | kErrored | kCorked) !== 0) || ((state[kState] & kConstructed) === 0)) {
if ((state[kState] & kBuffered) === 0) {
state[kState] |= kBuffered;
state[kBufferedValue] = [];
Expand Down

0 comments on commit eb34ffd

Please sign in to comment.