Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Update on can.Model's nested object throws error on recursive mustache template #514
Rendering recursive tree structure with can.Model and mustache works nicely, as you can see in this fiddle: http://jsfiddle.net/huhku/puYWE/5/
However, pushing newly created item into the tree structure (by clicking the button in the fiddle) throws an error in the console. The stack trace looks like an infinite loop of some sort (perhaps).
Strangely, this does not seem to be a problem with a simple can.Observable / can.Map (See this fiddle: http://jsfiddle.net/huhku/puYWE/3/ ), where everything seems to work as expected.
This is fixed by #883. When 2.1 is released, you should change your template to: