You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using ember-elsewhere you might not always want to provide a defined value (e.g. a page where nothing should be rendered in the elsewhere). Currently when passing an undefined value to an animated-value and at the same time providing a key attribute throws a Assertion Failed: Cannot call get with 'text' on an undefined object.
Ah, make sense. I think we would fix this in animated-value. Currently it essentially passes items=[value] to animated-each, but when value is null we should pass items=[].
My apologies, but now that I think more about it, I was wrong in my comment above.
null is a valid value that you may want to render and animate.
For example:
{{#animated-valuemyPreferenceas |pref|}}{{#ifpref}}
Your preference is {{pref}}.
{{else}}
You have not chosen a preference.
{{/if}}{{/animated-value}}
While it would be possible to make animated-value accept its own {{else}} block, that's a complication I would rather avoid, when you can achieve the same thing as above without learning a new concept.
So instead I think we should add guards where we try to use the key property to access properties on the possibly-null value.
When using ember-elsewhere you might not always want to provide a defined value (e.g. a page where nothing should be rendered in the elsewhere). Currently when passing an undefined value to an
animated-value
and at the same time providing akey
attribute throws aAssertion Failed: Cannot call get with 'text' on an undefined object.
Seems to be originating from https://github.com/ember-animation/ember-animated/blob/master/addon/components/animated-each.js#L88
The text was updated successfully, but these errors were encountered: