Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
render: render
, isTransitional: isTransitional
, mapRoute: mapRoute
, RenderReq: RenderReq
}

function isTransitional(pattern) {
Expand Down Expand Up @@ -86,7 +87,7 @@ RenderReq.prototype.routeTransitional = function(i, next) {
// no op function, so that routes can expect it to be defined
function done() {}
this.onMatch(item.to, params, function(err) {
if (err) return req.cancel()
if (err) return req.cancel(err)
req.routeTransitional(i, next)
}, done)
return
Expand All @@ -102,7 +103,7 @@ RenderReq.prototype.routeQueue = function(i, next) {
var req = this
var params = this.routeParams(route)
this.onMatch(route, params, function(err) {
if (err) return req.cancel()
if (err) return req.cancel(err)
req.routeQueue(i, next)
})
return
Expand Down