Don't throw error when repo can't be find
When visiting page of repo that doesn't exist, we should not throw an error. It still does not work as expected, redirecting to /undefined/undefined, which should be addressed as well, but at least we don't throw errors now.
This commit is contained in:
parent
938aaafc71
commit
ae9ff005d3
|
@ -204,7 +204,7 @@ Travis.Router = Ember.Router.extend
|
||||||
dynamicSegmentPattern: "([^/#]+)"
|
dynamicSegmentPattern: "([^/#]+)"
|
||||||
|
|
||||||
connectOutlets: (router, repo) ->
|
connectOutlets: (router, repo) ->
|
||||||
unless repo.constructor == Travis.Repo
|
if repo && repo.constructor != Travis.Repo
|
||||||
repo = Travis.Repo.find(repo.id)
|
repo = Travis.Repo.find(repo.id)
|
||||||
router.get('repoController').set 'repo', repo
|
router.get('repoController').set 'repo', repo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user