diff --git a/index.js b/index.js index 4b27091..75723ad 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,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; }