This commit is contained in:
Jeremy Ashkenas
2011-10-31 10:59:54 -04:00
parent b2407efb43
commit 5ebbeb0ce2

View File

@@ -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));
},