Skip to content

Commit

Permalink
Even fixes for kickstart router
Browse files Browse the repository at this point in the history
  • Loading branch information
mrg2001 committed Aug 8, 2016
1 parent e07d2cf commit f8d2f90
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kickstart/ks-route.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ kickStart.register('route', function () {
}
}
// path not found
if (typeof app.route.trigger == 'function') {
var eventData = app.route.trigger({ phase: 'before', type: 'error', target: 'self', hash: hash});
if (eventData.isCancelled === true) return false;
}
console.log('ERROR: route "' + hash + '" not found');
// if events are available
if (typeof app.route.trigger == 'function') app.route.trigger($.extend(eventData, { phase: 'after' }));
}

/*
Expand Down

0 comments on commit f8d2f90

Please sign in to comment.