[Pkg-javascript-commits] [backbone] 171/281: more descriptive variable name

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.9.0
in repository backbone.

commit 4dd506c3d466983c1247d44df2b78db3b981483b
Author: Brad Dunbar <dunbarb2 at gmail.com>
Date:   Wed Jan 11 18:25:17 2012 -0500

    more descriptive variable name
---
 backbone.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/backbone.js b/backbone.js
index 0581cc7..f72eb2f 100644
--- a/backbone.js
+++ b/backbone.js
@@ -416,11 +416,11 @@
     // Add a model, or list of models to the set. Pass **silent** to avoid
     // firing the `added` event for every new model.
     add : function(models, options) {
-      var i, l;
+      var i, length;
       options || (options = {});
       if (!_.isArray(models)) models = [models];
       models = slice.call(models);
-      for (i = 0, l = models.length; i < l; i++) {
+      for (i = 0, length = models.length; i < length; i++) {
         var model = models[i] = this._prepareModel(models[i], options);
         var hasId = model.id != null;
         if (this._byCid[model.cid] || (hasId && this._byId[model.id])) {
@@ -430,12 +430,12 @@
         if (hasId) this._byId[model.id] = model;
         model.bind('all', this._onModelEvent, this);
       }
-      this.length += l;
+      this.length += length;
       i = options.at != null ? options.at : this.models.length;
       splice.apply(this.models, [i, 0].concat(models));
       if (this.comparator) this.sort({silent: true});
       if (options.silent) return this;
-      for (i = 0; i < l; i++) {
+      for (i = 0; i < length; i++) {
         models[i].trigger('add', models[i], this, options);
       }
       return this;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list