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
If I have helper called changeset and also a property on a component called changeset, these two code examples work differently in Ember 3.4:
{{my-child changeset=changeset}} Passes in the "changeset" property
<MyChild @changeset={{changeset}} /> Calls the "changeset" helper with no arguments.
However, 2. works the same as 1. if you're using Ember 3.3 with ember-angle-bracket-invocation-polyfill. As a result, users upgrading from Ember 3.3 with the polyfill to 3.4 might see some unexpected behavior.
This is the type of ambiguity that RFC 308 is trying to prevent but the deprecation and code mods haven't yet been implemented.
ember-template-lint includes a no-implicit-this specifically to catch this case in existing code. We should likely fix the polyfill to have consistent behavior to the real feature (always calling the helper), would you mind making an issue (or even a failing test PR)?
Unfortunately, this is probably "working as intended" (a.k.a. "probably too late to fix" now). RFC 432 propose to deprecate the second behavior. I would love to be proven wrong (about the "probably too late" part), but what I proposed in the RFC is probably the best we can do.
If I have helper called
changeset
and also a property on a component calledchangeset
, these two code examples work differently in Ember 3.4:{{my-child changeset=changeset}}
Passes in the "changeset" property<MyChild @changeset={{changeset}} />
Calls the "changeset" helper with no arguments.However, 2. works the same as 1. if you're using Ember 3.3 with ember-angle-bracket-invocation-polyfill. As a result, users upgrading from Ember 3.3 with the polyfill to 3.4 might see some unexpected behavior.
This is the type of ambiguity that RFC 308 is trying to prevent but the deprecation and code mods haven't yet been implemented.
Reproduced in this twiddle
The text was updated successfully, but these errors were encountered: