[Pkg-javascript-commits] [backbone] 136/281: Use getValue to interpret urlRoot instead.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:05 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 93a39110defdd22caf60d4221441390541872852
Author: = <=>
Date:   Thu Dec 22 17:19:07 2011 -1000

    Use getValue to interpret urlRoot instead.
---
 backbone.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/backbone.js b/backbone.js
index cec63a1..edb6943 100644
--- a/backbone.js
+++ b/backbone.js
@@ -292,8 +292,7 @@
     // using Backbone's restful methods, override this to change the endpoint
     // that will be called.
     url : function() {
-      var base = getValue(this.collection, 'url') || this.urlRoot || urlError();
-      if (typeof(base) == 'function') base = base.call(this); // allow urlRoot to be determined at runtime
+      var base = getValue(this.collection, 'url') || getValue(this, 'urlRoot') || urlError();
       if (this.isNew()) return base;
       return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + encodeURIComponent(this.id);
     },

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