Skip to content

Commit

Permalink
Fix stream check (#60)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
rj-david and sindresorhus committed Mar 21, 2022
1 parent 88a95be commit 4eefe15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -70,7 +70,7 @@ const destroyCircular = ({
}

// TODO: Use `stream.isReadable()` when targeting Node.js 18.
if (typeof value === 'object' && typeof value.pipe === 'function') {
if (value !== null && typeof value === 'object' && typeof value.pipe === 'function') {
to[key] = '[object Stream]';
continue;
}
Expand Down

0 comments on commit 4eefe15

Please sign in to comment.