Permalink
Browse files

Make Router.routes accept a function

  • Loading branch information...
1 parent 29ad43e commit 5a281c511d9c232ac2e4508278c1a8d63c41b386 @brysgo brysgo committed with = Mar 15, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 backbone.js
View
@@ -990,6 +990,7 @@
// routes can be defined at the bottom of the route map.
_bindRoutes: function() {
if (!this.routes) return;
+ this.routes = _.result(this, 'routes');
var route, routes = _.keys(this.routes);
while ((route = routes.pop()) != null) {
this.route(route, this.routes[route]);

0 comments on commit 5a281c5

Please sign in to comment.