Closed vweevers closed 5 years ago
Related to #27, I found a new edge case.
This PR adds two tests and a fix. Without the fix, the first test would fail with 'Cannot call write after a stream was destroyed'. The second test is to ensure the other code path still works, that is:
https://github.com/mafintosh/duplexify/blob/9dc80c1387d92270f2878c467e84a897973a71f7/index.js#L208
Followed by:
https://github.com/mafintosh/duplexify/blob/9dc80c1387d92270f2878c467e84a897973a71f7/index.js#L190
cc @mcollina
Makes total sense.
4.1.0
Related to #27, I found a new edge case.
This PR adds two tests and a fix. Without the fix, the first test would fail with 'Cannot call write after a stream was destroyed'. The second test is to ensure the other code path still works, that is:
https://github.com/mafintosh/duplexify/blob/9dc80c1387d92270f2878c467e84a897973a71f7/index.js#L208
Followed by:
https://github.com/mafintosh/duplexify/blob/9dc80c1387d92270f2878c467e84a897973a71f7/index.js#L190