Closed sgnl closed 8 years ago
Thankfully, I can still push data down the pipeline with callback(null, dataToPass)
.
.pipe(Through2((chunk, enc, callback) => {
//...
callback(null, results);
}))
Hi @sgnl -- I believe what you are running into is how arrow functions work: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
An arrow function expression (also known as fat arrow function) has a shorter syntax compared to function expressions and lexically binds the this value (does not bind its own this, arguments, super, or new.target).
Any clarification on why this is happening?
Misc specs
Node version:
5.6.0
strict-mode: enabled via'use strict'
through2 version:2.0.1
The Good :+1:
Works fine with keyword
Function
declaration:The Bad :-1:
_Breaks when using ES2015 Arrow Function: _
The Ugly :bug:
\ The error displayed in my cli: **
Searched through Issues and I did not find anything related. Posting here as reference for anyone that may experience the issue in the future.
Aloha.