[Pkg-javascript-commits] [backbone] 124/211: _ to status in Model.parse. No need to clobber Underscore.js just to ignore a parameter.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:00:12 UTC 2014


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

js pushed a commit to tag 0.5.0
in repository backbone.

commit 399e7453f34aa366010b225eecc7d4ec0eea1a80
Author: Samuel Clay <samuel at ofbrooklyn.com>
Date:   Fri Apr 22 11:32:57 2011 -0400

    _ to status in Model.parse. No need to clobber Underscore.js just to ignore a parameter.
---
 backbone.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backbone.js b/backbone.js
index b41c77c..55b4baf 100644
--- a/backbone.js
+++ b/backbone.js
@@ -290,7 +290,7 @@
       if (attrs && !this.set(attrs, options)) return false;
       var model = this;
       var success = options.success;
-      options.success = function(resp, _, xhr) {
+      options.success = function(resp, status, xhr) {
         if (!model.set(model.parse(resp, xhr), options)) return false;
         if (success) success(model, resp, request);
       };
@@ -514,7 +514,7 @@
       options || (options = {});
       var collection = this;
       var success = options.success;
-      options.success = function(resp, _, xhr) {
+      options.success = function(resp, status, xhr) {
         collection[options.add ? 'add' : 'refresh'](collection.parse(resp, xhr), options);
         if (success) success(collection, resp);
       };

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