Skip to content

Commit

Permalink
Guard routes for-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed May 25, 2015
1 parent 09dc407 commit 1eb69a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,7 @@
// routes can be defined at the bottom of the route map.
_bindRoutes: function() {
var routes = _.result(this, 'routes');
if (!routes) return;
for (var route in routes) {
this.route(route, routes[route]);
}
Expand Down

0 comments on commit 1eb69a3

Please sign in to comment.