babel-plugin-console icon indicating copy to clipboard operation
babel-plugin-console copied to clipboard

Fails to transpile if function assigned to computed property

Open miklosme opened this issue 8 years ago • 1 comments

Bug

  • babel-plugin-console version: 0.2.0
  • node version: v6.9.4
  • npm (or yarn) version: yarn v0.27.5
{
    [ActionTypes.FOO_BAR](payload) {
        // ...
        console.scope('debug')
    },
}

Put console.scope inside a function, which is assigned to a computed property.

Result: transpile fails, says Cannot read property 'name' of undefined.

miklosme avatar Sep 17 '17 21:09 miklosme

Thanks @miklosme for the bug report :+1:

I'm away from a keyboard for rest of the week so I'll take a look when I'm back

mattphillips avatar Sep 20 '17 13:09 mattphillips