[Pkg-javascript-commits] [backbone] 86/281: simpler arg parsing

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:01:59 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 7658021e98890ca8e28177cf0f7f8f4f53ea09bc
Author: Brad Dunbar <dunbarb2 at gmail.com>
Date:   Wed Nov 16 14:13:15 2011 -0500

    simpler arg parsing
---
 backbone.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/backbone.js b/backbone.js
index 06b444f..84e91c5 100644
--- a/backbone.js
+++ b/backbone.js
@@ -223,9 +223,8 @@
     // to silence it. `unset` is a noop if the attribute doesn't exist.
     unset : function(attrs, options) {
       if (_.isString(attrs)) {
-        var key, args = _.toArray(arguments), attrs = {};
-        while (_.isString(key = args.shift())) attrs[key] = void 0;
-        options = key;
+        var args = _.toArray(arguments), attrs = {};
+        while (_.isString(options = args.shift())) attrs[options] = void 0;
       }
       (options || (options = {})).unset = true;
       return this.set(attrs, options);

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