olivernn/davis.js

Route not found causes davis to stop

bennigraf opened this issue · 1 comments

Hi there!

In my very simple application calling a link that has no route defined causes the davis-app to stop. The log says application stopped right before the Route not found message. Clicking on links with registered routes after that generate more Route not found-messages in the log and the actions aren't being called.

I also tried various settings (raiseErrors=false and handleRouteNotFound=false), but that didn't seem to change anything.

Is this intended behaviour?

I'm in Chrome 30.0.1599.101 and using jquery 2.0.3.

I ran into a similar problem. I believe this is expected because if davis cannot find a link it is going to send it to the server which should cause the page to reload. The problem I ran into was when I submitted a form directly to an iframe (via the target attribute) and so davis assumed the browser was going to refresh - but it didn't - and stopped the app. I simply added a check to my code to see if davis is stopped and restart it.