Re: [whatwg/streams] Don't mandate transform method in TransformStream (#573)

domenic commented on this pull request.



>    const controller = transformStream._transformStreamController;
-  const transformPromise = PromiseInvokeOrNoop(transformStream._transformer,
-                             'transform', [chunk, controller]);
+  let transformPromise;
+  if (transformer.transform === undefined) {

Oh, this is not great. We should only get the `transformer.transform` once. This gets it twice, once here and once inside PromiseInvokeOrNoop. I am not sure what a good design is.

-- 
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/573#pullrequestreview-6101590

Received on Thursday, 27 October 2016 16:55:49 UTC