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

can.Component helpers context issue #515

Closed
wclr opened this issue Oct 28, 2013 · 2 comments
Closed

can.Component helpers context issue #515

wclr opened this issue Oct 28, 2013 · 2 comments
Milestone

Comments

@wclr
Copy link
Contributor

wclr commented Oct 28, 2013

Template helper for any component instance away has context of the first initialized instance.

http://jsfiddle.net/xKc3H/246/

The issue can be solved if to modify helpers setup in component.js by replacing

helpers = this.helpers || {};

with

helpers = can.extend({}, this.helpers)
@ghost ghost assigned justinbmeyer and imjoshdean Oct 28, 2013
@imjoshdean
Copy link
Contributor

Yup, makes sense. helpers is doesn't change pointers whereas you turn it into a new object.

Adding a test based on your fiddle as well that reflects the change/issue.

imjoshdean added a commit that referenced this issue Oct 29, 2013
Fix to multiple tags not necessarily having the right context. Close #515
@justinbmeyer
Copy link
Contributor

Shoot. Fixed this last night but did not push.

Sent from my iPhone

On Oct 29, 2013, at 3:29 PM, Josh Dean notifications@github.com wrote:

Closed #515 via 4e1580e.


Reply to this email directly or view it on GitHub.

justinbmeyer added a commit that referenced this issue Oct 30, 2013
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

No branches or pull requests

3 participants