Permalink
Browse files

Clarify that `this._models` is a sparse array.

  • Loading branch information...
1 parent 0f97aa8 commit 08181fea76a90adf872edb6b6b16086c3f0a07bb @rgrove committed Jun 20, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/app/js/lazy-model-list.js
@@ -105,6 +105,10 @@ Y.LazyModelList = Y.Base.create('lazyModelList', Y.ModelList, [], {
// the list, just being freed from memory. If something else
// still holds a reference to it, it may still bubble events to
// the list, but that's okay.
+ //
+ // `this._models` is a sparse array, which ensures that the
+ // indices of models and items match even if we don't have model
+ // instances for all items.
delete this._models[index];
}
} else {

0 comments on commit 08181fe

Please sign in to comment.