diff --git a/app/modules/home/working-on/working-on.directive.coffee b/app/modules/home/working-on/working-on.directive.coffee index 2a806655..3e0cdaae 100644 --- a/app/modules/home/working-on/working-on.directive.coffee +++ b/app/modules/home/working-on/working-on.directive.coffee @@ -1,8 +1,10 @@ WorkingOnDirective = (homeService, currentUserService) -> link = (scope, el, attrs, ctrl) -> - userId = currentUserService.getUser().get("id") - - ctrl.getWorkInProgress(userId) + user = currentUserService.getUser() + # If we are not logged in the user will be null + if user + userId = user.get("id") + ctrl.getWorkInProgress(userId) return { controller: "WorkingOn",