-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I haven't managed to get a clear reproduction of this case yet, but I have a collection view where one of the models in the collection results in multiple views.
Has anyone else seen this? I've got a speculative fix, to check if the model already exists.
_registerCollectionEvents : function() {
this.listenTo( this.collection, "add", function( model ) {
var modelView;
if( this._hasBeenRendered ) {
**modelView = this.viewManager.findByModelCid( model.cid );
if (!modelView) {**
modelView = this._createNewModelView( model, this._getModelViewOptions( model ) );
this._insertAndRenderModelView( modelView, this._getContainerEl(), this.collection.indexOf( model ) );
**}**
}
if( this._isBackboneCourierAvailable() )
this.spawn( "add", modelView );
else this.trigger( "add", modelView );
} );
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels