Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added silent flag to recalculate().

  • Loading branch information...
commit 39619f0e58cdafe6de159844cdcac8f5ec76fb76 1 parent 84f1953
Steven Lindberg authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 backbone.subset.js
View
8 backbone.subset.js
@@ -110,7 +110,7 @@
// re-evaluate each model's eligibility
_.result(this, 'parent').each(function (model) {
- changed |= this._updateModelMembership(model);
+ changed |= this._updateModelMembership(model, {silent: true});
}, this);
// only trigger reset event if the subset actually changed
@@ -291,18 +291,18 @@
* @param {Object} model
* @return {Boolean} changed
*/
- Subset._updateModelMembership = function (model) {
+ Subset._updateModelMembership = function (model, options) {
var hasId = !model.id
, alreadyInSubset = this._byCid[model.cid] || (hasId && this._byId[model.id]);
if (this.sieve(model)) {
if (!alreadyInSubset) {
- this._addToSubset(model);
+ this._addToSubset(model, options);
return true;
}
} else {
if (alreadyInSubset) {
- this._removeFromSubset(model);
+ this._removeFromSubset(model, options);
return true;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.