Closed selfrefactor closed 7 years ago
I believe the issue is caused by let
used instead of var
.
In readme you can find the following:
Note: Kneden only supports transpiling ES5 with the addition of async/await. If you're using other ES6 features (like arrow functions, let/const, classes, etc.), make sure you transpile them down to valid ES5 code first using the babel es2015 preset.
I've tried to use var
instead, and the 1st line of the function generated become
var willReturn;
Thank you for your response. So at the end is my error I didn't read the documentation more seriously, sorry for opening this issue.
So the issue is the following -
This code
is compiled to
The problem is that the line of defining willReturn is inside the promise and this blocks execution of the code one it reaches _willReturn.browserPerf = _resp_
The line * let willReturn = {};* should be the first line of the function body, not the second. Otherwise the library is great, congratulations on that.