diff --git a/index.js b/index.js index bdbd77b..230be21 100644 --- a/index.js +++ b/index.js @@ -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; }