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

isonmad commented on this pull request.



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

Oh right. InvokeOrNoop already solved this: you get it, then call method.apply later if it's not undefined. But we need to either open code it or design an entirely new helper function that will only be used in exactly one caller, like `PromiseInvokeOrFallbackOrNoop` 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

Received on Thursday, 27 October 2016 17:01:36 UTC