unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
443 stars 22 forks source link

fix(node/stream): stop writing data when `writableEnded` is set #79

Closed pi0 closed 1 year ago

pi0 commented 1 year ago

With support of multiple chunks (https://github.com/unjs/unenv/pull/75), some edge cases raise when with direct fetch, chunks was being written after res.end. This PR prevents that.