Don't fail if user signs out before router is set up

This commit is contained in:
Piotr Sarnacki 2013-07-31 13:45:23 +02:00
parent ded00e0182
commit 8daf5b857a

View File

@ -17,7 +17,11 @@
user.unload()
Travis.__container__.lookup('controller:currentUser').set('content', null)
if router = Travis.__container__.lookup('router:main')
router.send('afterSignOut')
try
router.send('afterSignOut')
catch e
throw e unless e.message =~ /There are no active handlers/
signIn: (data) ->
if data