ember-collection
ember-collection copied to clipboard
Don't keep references to cells not in the 'items' colltection
If some items (that are currently visible) are removed from the ‘items’ collection, then they are still referenced in the _cells property. So they are still in the DOM (display: none). If afterwards these removed items are destroyed (item.destroy) and a re-rendering (e.g.: change of screen size) occurs. Then this result in an error: Assertion Failed: Cannot call writableTag after the object is destroyed.
This pull request removes all cells that are not in the items collection.