-
-
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
[Glimmer 2] Assertion Failed: You modified [property] twice in a single render #14013
Comments
Yea I think this is going to create unpredictable behavior sense you are essentially setting in a CP getter which is something we would like to avoid. Moving the I think we should lint for these types of patterns. /cc @rwjblue @chancancode @krisselden |
Is |
This is #13948 by the way. However, in this case it could be a bug if count is never referenced in a template |
Thanks. Yes, The thing that threw me was that simply adding |
I'm not certain that this is a supported case, but this is an issue that I've come across a number of times in Intercom's app.
It works if I remove the
this.incrementProperty('count');
.Twiddles:
Canary
(:green_apple:): https://ember-twiddle.com/c78fcbe4267c069f3898c28e3562962f?openFiles=components.my-component.js%2Ctemplates.components.my-component.hbsAlpha
(:red_circle:): https://ember-twiddle.com/0b95e3a8dcacabfbe3fe67c0ed240ec9?openFiles=components.my-component.js%2Ctemplates.components.my-component.hbswhich raises
Uncaught Error: Assertion Failed: You modified count twice in a single render. This was unreliable and slow in Ember 1.x and is no longer supported
.Alpha
with{{style}}
in template (:green_apple:): https://ember-twiddle.com/1f5550724172dfb5cb67870dbb744648?openFiles=components.my-component.js%2Ctemplates.components.my-component.hbswhich works and leads me to suspect that this is a bug in Glimmer.
This works in both
Canary
andAlpha
:LMK if this is a bug and I'll add a failing test case
The text was updated successfully, but these errors were encountered: