Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCustomFunctionDetails throwing exception for anonymous functions #568

Closed
badams2527 opened this issue Jan 25, 2018 · 2 comments
Closed

Comments

@badams2527
Copy link

Version

4.1.0

Browser and OS info

Chrome 64.0.3282.119 / Windows 10

Steps to reproduce

This occurred on version 4.1.1 but that was not an option on the issue helper site

Clone repository from: https://github.com/badams2527/devtools-issue

Install npm packages npm install

Run the project using npm run dev

Open the application in Chrome, then open Vue devtools.

In Vue devtools, navigate down the component tree to KendoGrid.

Click on KendoGrid.

Notice the console error

Here's a screenshot of the error

What is expected?

It should populate the component instance details in the right panel.

What is actually happening?

It is throwing an exception in the log and not populating the right panel


I set a debug point at that line in backend.js (after pretty printing), and checking the argument. It's returning

"function anonymous(d
/*``*/) {
return d.Total
}"

after the toString, leading me to believe it's just not set to handle anonymous functions properly.

@simplesmiler
Copy link
Member

Also stumbled upon something similar to this. I was adding lodash with a global mixin to be used in component templates. And lodash has this feature of overloading lodash.toString with a completely different meaning (specifically, it is used to cast arguments to string instead of serialization), so it's not being serialized properly.

simplesmiler added a commit to simplesmiler/vue-devtools that referenced this issue Jan 25, 2018
@Akryum Akryum added the bug label Jan 26, 2018
@Akryum Akryum self-assigned this Jan 26, 2018
Akryum pushed a commit that referenced this issue Jan 26, 2018
* Edge case of incorrectly serialized function 

Should fix #568

* Function.toString hijacking example

* Use prototype toString
@francoisromain
Copy link

Same bug for me. I can not use vue-devtools currently. Please could you release the fix? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants