-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Infinite loop on component click #561
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
Comments
Do you have a codepen to share? |
I have not since the code is enterprise 😞 I cannot debug this anymore as I do not have the issue anymore. 🤔 |
I was too fast on my assumptions. I had stashed my changes and that's what made it work. However, this makes my code be the faulty part. I have debugged a bit and tried to create a more or less identical pen of my env. Only difference is that on my end this pen is a component (the OrderForm from the video above) and some 3rd party components are commented out. I did not manage to reproduce the issue in codepen due to me not knowing how to import files(components) there. There is however a issue related to the "cancel" button you see in the example. I believe this might be a pointer to the problem. I managed to "fix" the problem locally on my dev env by removing the Is there something I'm doing wrong here, or is there something strange going on with buttons inside forms? 🤔 |
I don't know what happened but i met similar problem. Then i remove this plugin and install it again with version 4.1.1, the problem is solved. Could it caused by the process of plugin updating of chrome, because our problem started at similar time? |
@BlitZz96 Can you confirm the issue is solved by 4.1.1? |
one more thing, i thing this issue is related to 'circular refs' (as i just see #550 ), because i remember it happened when i try to inspect into circular component or the circular component is updated. |
@Akryum My issue is not resolved by 4.1.1 I have however found the sinner: modifiedProducts() {
return this.order.products.map(product => {
const provider = this.order.providers.find(p => p.id == product.providerId);
if (provider) {
product.name += " (" + provider.name + ")";
}
return product;
})
} This computed function is feeding an select in my app with a modified object of products. |
You really shouldn't modify state in computed properties. This can indeed lead to infinite loops. |
You can enforce it with this eslint rule. |
Thank you for the tip @Akryum 👍 ❤️ |
Yes, I'm quite sure about that 😄 |
Well, I feel bad for wasting your time then 😮 Appreciate your help! 😄 |
Uh oh!
There was an error while loading. Please reload this page.
Version
4.1.0
Browser and OS info
Chrome 63 / Windows 10
Steps to reproduce
Video 1; dev version of vue-devtools
Video 2
What is expected?
Component instance data on the right panel
What is actually happening?
infinite loop; serialized 40 instances....
When chrome reaches 1000 console logs it crashes
Happened after autoupdate
The text was updated successfully, but these errors were encountered: