[Backport] Fixing js error when redirecting /login for anonymous users
parent
606a58894a
commit
24c4ccc42c
|
@ -1,8 +1,10 @@
|
||||||
WorkingOnDirective = (homeService, currentUserService) ->
|
WorkingOnDirective = (homeService, currentUserService) ->
|
||||||
link = (scope, el, attrs, ctrl) ->
|
link = (scope, el, attrs, ctrl) ->
|
||||||
userId = currentUserService.getUser().get("id")
|
user = currentUserService.getUser()
|
||||||
|
# If we are not logged in the user will be null
|
||||||
ctrl.getWorkInProgress(userId)
|
if user
|
||||||
|
userId = user.get("id")
|
||||||
|
ctrl.getWorkInProgress(userId)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controller: "WorkingOn",
|
controller: "WorkingOn",
|
||||||
|
|
Loading…
Reference in New Issue