-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[1.13.5] Computed properties recalculate on destroyed objects #11926
Comments
CP are lazy and as such don't recalculate on there own. I suspect you have an eager observer or a run.schedule in your code causing the cp to be consumed |
Have you seen my jsbin? |
Seems to work properly on beta (unless I am misinterpretting the console output): http://rwjblue.jsbin.com/zasihe/edit?html,js,output |
This is an issue with arrayComputed / reduceComputed, as they are not well behaved CP in 1.x. It is a non-trivial fix, that is part of 2.0 and is unlikely to be backported to 1.1x |
I confirm, it works properly on beta :) I should have checked it before so sorry for your time and thanks for help. |
No need to be sorry, we are sorry this bug exists in 1.13.x. Thanks for reporting! |
During work on my project I just encountered problem caused by computed property that was recalculated for component that has been destroyed (removed from the DOM and flag isDestroying set to true). For me it looks undesired to recalculate a bunch of computed properties on destroyed objects since it may cause exceptions or performance issues but maybe it is by design?
Here is jsbin to give you better insight into the problem: http://emberjs.jsbin.com/radopigisa/edit?html,js,output
The text was updated successfully, but these errors were encountered: