Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fixup: explicit cast to Boolean
  • Loading branch information
ronag committed Feb 1, 2020
commit 6160cdb0880380876b2d5fd91b52b5ca8f18b3bc
2 changes: 1 addition & 1 deletion lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ ObjectDefineProperties(Readable.prototype, {
const r = this._readableState;
if (!r) return false;
if (r.readable !== undefined) return r.readable && !r.endEmitted;
return !r.destroyed && !r.errorEmitted && !r.endEmitted;
return Boolean(!r.destroyed && !r.errorEmitted && !r.endEmitted);
Comment thread
ronag marked this conversation as resolved.
},
set(val) {
// Backwards compat.
Expand Down
2 changes: 1 addition & 1 deletion lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ ObjectDefineProperty(Writable.prototype, 'writable', {
const w = this._writableState;
if (!w) return false;
if (w.writable !== undefined) return w.writable;
return !w.destroyed && !w.errored && !w.ending;
return Boolean(!w.destroyed && !w.errored && !w.ending);
Comment thread
ronag marked this conversation as resolved.
},
set(val) {
// Backwards compat.
Expand Down