Commit c56448f3 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Return empty array if no issue_references param or target_issue is given

parent eb9cddbe
......@@ -38,9 +38,11 @@ module IssueLinks
extract_issues_from_references
elsif target_issue
[target_issue]
else
[]
end
issues&.select { |issue| can?(current_user, :admin_issue_link, issue) }
issues.select { |issue| can?(current_user, :admin_issue_link, issue) }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment