Closed djMax closed 6 years ago
In your example, the variable 'x' is undefined. Fixing that works (see link below), however I suspect that the error you're seeing Babel trying to unwind the `for...of`` loop. Can I suggest testing with no transforms other than fast-async to check it works correctly? The following snippet works for me:
echo 'export default async function blowUp(obj) {
if (obj) {
for (const fk of Object.keys(obj)) {
console.log(fk);
}
}
}
blowUp({a:1,b:2,c:4}) ;' | node tests/node_modules/babel-cli/bin/babel
async function blowUp(obj) {
if (obj) {
for (const fk of Object.keys(obj)) {
console.log(fk);
}
}
}
blowUp({ a: 1, b: 2, c: 4 });
In all honesty, with no await
in the code, the transform is pretty minor.
Closing this as there's no reproducible issue.
Results in: