summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-06-15 07:19:54 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-06-19 10:56:55 +0200
commitb5b5658868a8aaac0dc340f6d7c9a14842cab2e5 (patch)
treeb2ef2a019e3658e2dec322966241a83197d61aad /app/finders
parent932a9a0c77a02e1d948f45cffe5e936e915ae0bc (diff)
downloadgitlab-ce-b5b5658868a8aaac0dc340f6d7c9a14842cab2e5.tar.gz
Separate conditions to increase readability
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/notes_finder.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index 83bf015488f..06d01245e90 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -36,7 +36,8 @@ class NotesFinder
target_id = @params[:target_id]
target_iid = @params[:target_iid]
- return @target = nil unless target_type && (target_id || target_iid)
+ return @target = nil unless target_type
+ return @target = nil unless (target_id || target_iid)
@target =
if target_type == "commit"