vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.68k stars 4.14k forks source link

Error when highlighting the child of a functional component: "backend.js:396 Uncaught TypeError: Cannot read property 'name' of undefined" #1067

Open acdcjunior opened 5 years ago

acdcjunior commented 5 years ago

Version

5.1.1

Browser and OS info

Chrome 76 / Windows 10

Steps to reproduce

Full/complete steps:

Error:

backend.js:396 Uncaught TypeError: Cannot read property 'name' of undefined
    at getComponentName (backend.js:396)
    at highlight (backend.js:1600)
    at Bridge.<anonymous> (backend.js:2170)
    at Bridge.emit (backend.js:6074)
    at Bridge._emit (backend.js:5897)
    at backend.js:5822
    at Array.forEach (<anonymous>)
    at backend.js:5822
    at listener (backend.js:3215)

What is expected?

no errors

What is actually happening?

console logs error


bobvandevijver commented 4 years ago

This is still relevant, and actually quite annoying. But, as mentioned in the SO question, in my case it seem to be related to scoped styles in functional component. When there is no scoped style, the error is gone. So for know, move the scoped styling to some global place is a valid workaround for me.

@acdcjunior Your reproducable example is gone btw.

acdcjunior commented 4 years ago

@bobvandevijver Apparently, there's a bug in codesandbox. The link is https://codesandbox.io/s/vue-template-xsy58 . It only works when I'm logged in.