Re: [whatwg/streams] Unified error handling for WritableStream (#721)

ricea commented on this pull request.



>  
   assert(state === 'writable', 'state must be writable');
 
   const error = new TypeError('Requested to abort');
-  if (stream._pendingAbortRequest !== undefined) {
+  if (stream._pendingAbortRequest === true) {

It was a no-op. There was a correct check above. I have removed the redundant check.

Coverage says the real check was being tested, but I can't find the test that does it. Maybe it is a piping one? Anyway, I added an explicit test for double aborting just to make it clear.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/721#discussion_r109140536

Received on Friday, 31 March 2017 11:28:27 UTC