Skip to content
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

Regression 2.4.x wrong block param value {{with}} helper #13045

Closed
jcbvm opened this issue Mar 3, 2016 · 7 comments · Fixed by #13049
Closed

Regression 2.4.x wrong block param value {{with}} helper #13045

jcbvm opened this issue Mar 3, 2016 · 7 comments · Fixed by #13049

Comments

@jcbvm
Copy link

jcbvm commented Mar 3, 2016

Block param used in with helper returns wrong value (truthy value instead of object) when used for example with a belongsTo relationship of a model as block param.

JSBin: http://emberjs.jsbin.com/vetezutapa/3/edit?html,js,output

@rwjblue
Copy link
Member

rwjblue commented Mar 3, 2016

Thank you for opening the issue, I'll take a look to see if I missed the fixing commit in the 2.4 branch.

@luxzeitlos
Copy link
Contributor

I can confirm this. {{#with objectProxy as |data|}} will result in data being true.

chancancode added a commit that referenced this issue Mar 4, 2016
This fixes an issue in HTMLBars where passing a truthy proxy (i.e.
`{ isTruthy: true, ... }`) to `{{#with}}` would end up yielding
the literal `true` rather than the proxy itself.

The Glimmer implementation is unaffected by this bug.

Fixes #13045
@lozjackson
Copy link

I can also confirm this - Using the with helper with Object.Proxy. I have created an app that demonstrates the problem with a failing test.

https://github.com/lozjackson/ember-test

The test passes in 2.3.1, but fails in 2.4.1 (haven't tried 2.4.0).

@rwjblue
Copy link
Member

rwjblue commented Mar 5, 2016

We have a fix, which should be released in a couple days...

@lozjackson
Copy link

is there a branch I can try so I can (help) test the fix?

rwjblue pushed a commit that referenced this issue Mar 5, 2016
This fixes an issue in HTMLBars where passing a truthy proxy (i.e.
`{ isTruthy: true, ... }`) to `{{#with}}` would end up yielding
the literal `true` rather than the proxy itself.

The Glimmer implementation is unaffected by this bug.

Fixes #13045

(cherry picked from commit 1c8831e)
rwjblue pushed a commit that referenced this issue Mar 5, 2016
This fixes an issue in HTMLBars where passing a truthy proxy (i.e.
`{ isTruthy: true, ... }`) to `{{#with}}` would end up yielding
the literal `true` rather than the proxy itself.

The Glimmer implementation is unaffected by this bug.

Fixes #13045

(cherry picked from commit 1c8831e)
@rwjblue
Copy link
Member

rwjblue commented Mar 5, 2016

@lozjackson - The fix just landed and should be available for testing in canary, beta, and release builds within a few minutes. You can test release via bower install --save ember#release (it will be what becomes 2.4.2).

@lozjackson
Copy link

thanks.. I can confirm that it fixes the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants