[Backport] Fixing js error when redirecting /login for anonymous users
parent
606a58894a
commit
24c4ccc42c
|
@ -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