From 5ebbeb0ce255fd51f589544d8117bee1eb99b8ea Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 31 Oct 2011 10:59:54 -0400 Subject: [PATCH] Fixes #659 --- backbone.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backbone.js b/backbone.js index fb75cb9f..2e8be7e5 100644 --- a/backbone.js +++ b/backbone.js @@ -694,9 +694,7 @@ if (!_.isRegExp(route)) route = this._routeToRegExp(route); Backbone.history.route(route, _.bind(function(fragment) { var args = this._extractParameters(route, fragment); - if (callback){ - callback.apply(this, args); - } + callback && callback.apply(this, args); this.trigger.apply(this, ['route:' + name].concat(args)); }, this)); },