[Pkg-javascript-commits] [backbone] 23/37: use a while loop instead of do...while

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


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

js pushed a commit to tag 0.9.1
in repository backbone.

commit 17d0f12a591ac9a3b49284e9c5312009a7db4bc8
Author: Brad Dunbar <dunbarb2 at gmail.com>
Date:   Thu Feb 2 11:24:39 2012 -0500

    use a while loop instead of do...while
---
 backbone.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/backbone.js b/backbone.js
index 257e3b7..ceb22e5 100644
--- a/backbone.js
+++ b/backbone.js
@@ -385,13 +385,14 @@
     change: function(options) {
       if (this._changing || !this.hasChanged()) return this;
       this._changing = true;
+      this._moreChanges = true;
       for (var attr in this._changed) {
         this.trigger('change:' + attr, this, this._changed[attr], options);
       }
-      do {
+      while (this._moreChanges) {
         this._moreChanges = false;
         this.trigger('change', this, options);
-      } while (this._moreChanges);
+      }
       this._previousAttributes = _.clone(this.attributes);
       delete this._changed;
       this._changing = false;

-- 
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