summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-07 10:54:02 +0100
committerPhil Hughes <me@iamphill.com>2016-06-14 08:36:07 +0100
commit04c199a0ab2db012e8c5a190ce2836f22e846305 (patch)
treea009c654e89fa5155d071c8888943f586c3c578e /app/helpers
parenta1be3241ec1f91182435a10615beac15fcfe235a (diff)
downloadgitlab-ce-04c199a0ab2db012e8c5a190ce2836f22e846305.tar.gz
Fixed bug with sidebar when user is not logged in
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/issuables_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 88ef1a6468c..2ae7f5c5f32 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -78,7 +78,9 @@ module IssuablesHelper
end
def has_todo(issuable)
- current_user.todos.find_by(target_id: issuable.id, state: :pending)
+ unless current_user.nil?
+ current_user.todos.find_by(target_id: issuable.id, state: :pending)
+ end
end
private