Skip to content

Commit

Permalink
If there is no History and route is rejected, unlock and go to index
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwasner committed Jun 2, 2016
1 parent 962a51e commit 03bb5f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mvc/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ let _executeIfRouteExists = function(url, state, params) {
});
}
function _rejection(url){
!url && this.exec('/');
this.unlock();
if(!url || !History.length){
this.exec('/');
}
console.error('Unable to find a route' + (url ? ' for ' + url:'.'));
};

Expand Down

0 comments on commit 03bb5f3

Please sign in to comment.