Rethrow error if the error coming from router is not "Route missing"

This commit is contained in:
Piotr Sarnacki 2013-06-05 11:26:41 +02:00
parent 6bc7b69088
commit f87e4108a8

View File

@ -43,7 +43,10 @@ Ember.Router.reopen
try
@_super(url)
catch error
@_super('/not-found') if error.message.match(/No route matched the URL/)
if error.message.match(/No route matched the URL/)
@_super('/not-found')
else
throw(error)
# TODO: don't reopen Ember.Route to add events, there should be
# a better way (like "parent" resource for everything inside map)