[Pkg-javascript-commits] [backbone] 05/21: Call Backbone.Model.defaults() with "this" set to the model instance.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:01:05 UTC 2014


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

js pushed a commit to tag 0.5.2
in repository backbone.

commit 909c427cf4915049f152f6e431a3c5987bd1d47e
Author: Nadav <nadav at shesek.info>
Date:   Mon Jul 18 08:22:26 2011 +0300

    Call Backbone.Model.defaults() with "this" set to the model instance.
---
 backbone.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index 0dbc34b..db45db4 100644
--- a/backbone.js
+++ b/backbone.js
@@ -133,7 +133,7 @@
     var defaults;
     attributes || (attributes = {});
     if (defaults = this.defaults) {
-      if (_.isFunction(defaults)) defaults = defaults();
+      if (_.isFunction(defaults)) defaults = defaults.call(this);
       attributes = _.extend({}, defaults, attributes);
     }
     this.attributes = {};

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