Inactive views don't crash as expected

My example:

http://codepen.io/anon/pen/DCfkw

if you open the dev tools / console, you can see that all Ractive views go through a cycle of changing them.

However, if you wrap lines 8 and 9 in the html pane (basically, put each for model.grandChildTitles inside the closing div tag), you will see that only the child goes through its collapse loop.

I narrowed it down to the line ractive.js 11100 (v0.6.0, coming out of bower -> ractive / ractive.js if that makes any difference, although I see the same at http://cdn.ractivejs.org/latest /ractive.js - service 0.6.0 - line 11100) -

It would seem when you rip an element, if it has a fragment, ractive calls this.fragment.unrender( false )

, automatically assuming that the fragment is not a representation for itself, which should also be torn down.

Am I missing something? At first glance, it looks like a memory leak and something that would prevent me from performing any kind of action onteardown

. Am I just doing it wrong?

+3


source to share





All Articles