From 0a8b5bf7f0203b46894819947bb27aaa51e37c9f Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 18 Jun 2015 11:01:29 +0200 Subject: [PATCH] Fixing comments for anonymous user if any comment was deleted --- app/coffee/modules/common/history.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/coffee/modules/common/history.coffee b/app/coffee/modules/common/history.coffee index f9aeb35a..dc491dc4 100644 --- a/app/coffee/modules/common/history.coffee +++ b/app/coffee/modules/common/history.coffee @@ -276,8 +276,9 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c deleteCommentUser: comment.delete_comment_user.name deleteComment: comment.comment_html activityId: comment.id - canRestoreComment: (comment.delete_comment_user.pk == $scope.user.id or - $scope.project.my_permissions.indexOf("modify_project") > -1) + canRestoreComment: ($scope.user and + (comment.delete_comment_user.pk == $scope.user.id or + $scope.project.my_permissions.indexOf("modify_project") > -1)) }) html = $compile(html)($scope)