Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
stream.pipe: Don't call destroy() unless it's a function
  • Loading branch information
isaacs committed Sep 10, 2012
1 parent 54a4c63 commit 41e1b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stream.js
Expand Up @@ -71,7 +71,7 @@ Stream.prototype.pipe = function(dest, options) {
if (didOnEnd) return;
didOnEnd = true;

dest.destroy();
if (typeof dest.destroy === 'function') dest.destroy();
}

// don't leave dangling pipes when there are errors.
Expand Down

0 comments on commit 41e1b17

Please sign in to comment.