Mustache live binding throws "Cannot read property 'length' of undefined" in can.view.elements.after #744

Closed
honzatrtik opened this Issue Feb 19, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@honzatrtik

jsfiddle demonstrating error: http://jsfiddle.net/RxT6X/
it occurs, when i try to change can.List attribute bound in mustache template.

@daffl daffl added this to the 2.0.6 milestone Feb 19, 2014

@daffl daffl modified the milestones: 2.1.0, 2.0.6 Mar 13, 2014

@justinbmeyer justinbmeyer self-assigned this May 1, 2014

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer May 1, 2014

Contributor

Hmmm, you are setting an expando property on a list:

items.attr('spliced', true);
Contributor

justinbmeyer commented May 1, 2014

Hmmm, you are setting an expando property on a list:

items.attr('spliced', true);
@honzatrtik

This comment has been minimized.

Show comment
Hide comment
@honzatrtik

honzatrtik May 1, 2014

I see, but the documentation does not explicitly forbid this kind of use
and since can.List inherits from can.Map, it can be confusing.. It seems i
should check source code :)
Anyway thank you for the answer and for this great library!

On Thursday, May 1, 2014, Justin Meyer notifications@github.com wrote:

Hmmm, you are setting an expando property on a list:

items.attr('spliced', true);


Reply to this email directly or view it on GitHubhttps://github.com/bitovi/canjs/issues/744#issuecomment-41913188
.

I see, but the documentation does not explicitly forbid this kind of use
and since can.List inherits from can.Map, it can be confusing.. It seems i
should check source code :)
Anyway thank you for the answer and for this great library!

On Thursday, May 1, 2014, Justin Meyer notifications@github.com wrote:

Hmmm, you are setting an expando property on a list:

items.attr('spliced', true);


Reply to this email directly or view it on GitHubhttps://github.com/bitovi/canjs/issues/744#issuecomment-41913188
.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer May 1, 2014

Contributor

You are right it should be allowed. My comment was more a note for myself on where to start looking for the issue.

That commit fixes the problem.

Contributor

justinbmeyer commented May 1, 2014

You are right it should be allowed. My comment was more a note for myself on where to start looking for the issue.

That commit fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment