Fixing js error when redirecting /login for anonymous users
parent
ea7e5ebf49
commit
77b491fd0d
|
@ -1,7 +1,9 @@
|
|||
WorkingOnDirective = (homeService, currentUserService) ->
|
||||
link = (scope, el, attrs, ctrl) ->
|
||||
userId = currentUserService.getUser().get("id")
|
||||
|
||||
user = currentUserService.getUser()
|
||||
# If we are not logged in the user will be null
|
||||
if user
|
||||
userId = user.get("id")
|
||||
ctrl.getWorkInProgress(userId)
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue