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
whitecolor opened this Issue Oct 28, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@whitecolor
Contributor

whitecolor 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

This comment has been minimized.

Show comment
Hide comment
@imjoshdean

imjoshdean Oct 29, 2013

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.

Contributor

imjoshdean commented Oct 29, 2013

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

Merge pull request #518 from bitovi/515-component-helpers
Fix to multiple tags not necessarily having the right context. Close #515
@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Oct 29, 2013

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.

Contributor

justinbmeyer commented Oct 29, 2013

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