Can't make babel-plugin-idx works with async function
Closed this issue · 2 comments
didierfranc commented
Description
Everything is working fine until I use idx inside async function
const obj = { a: 0, b: { c: 1 } }
const Working = () => {
idx(obj, _ => _.b.c)
}
const notWorking = async () => {
idx(obj, _ => _.b.c)
}
I'm getting this :
babel config :
"babel": {
"presets": [
[
"es2015",
{
"modules": false
}
],
"react",
"stage-0"
],
"plugins": [
"idx",
[
"transform-runtime",
{
"helpers": false,
"polyfill": false
}
]
]
}
didierfranc commented
cc @fbonniec
yungsters commented
Looks like t.isArrowFunctionExpression
might only be returning true for non-async functions (if I'm reading babel-types/README.md correctly).
I would most welcome a PR if you're up for it!