Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 03ea0e2

Browse files
committed
Update Authenticated.coffee
1 parent 91c24af commit 03ea0e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/Authentication/Authenticated.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ module.config ($stateProvider) ->
1212
templateUrl: 'modules/Authenticated/Authenticated.html'
1313
abstract: true
1414
resolve:
15-
currentUser: (AppObject, Authentication, $state) ->
15+
currentUser: (AppObject, Authentication, $state, $q) ->
1616
Authentication.checkCredentials().then (userId) ->
1717
AppObject.getUser(userId)
1818
, (error) ->
19-
$state.go('login')
19+
# must return a rejected promise in order to stay in rejected-mode
20+
$q.reject( $state.go('login') )
2021
onEnter: (user) ->
2122
user.open()
2223
onExit: (user, $rootScope) ->

0 commit comments

Comments
 (0)