Separate conditions to increase readability

This commit is contained in:
Patrick Derichs 2019-06-15 07:19:54 +02:00
parent 932a9a0c77
commit b5b5658868

View file

@ -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"