mattphillips / babel-plugin-console

Babel Plugin that adds useful build time console functions 🎮
https://www.npmjs.com/package/babel-plugin-console
MIT License
295 stars 14 forks source link

Fails to transpile if function assigned to computed property #2

Open miklosme opened 7 years ago

miklosme commented 7 years ago

Bug

{
    [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.

mattphillips commented 7 years ago

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