Don't allow nil references to get added to results

This commit is contained in:
Robert Speicher 2015-04-23 14:01:35 -04:00
parent 2403a28b3f
commit c0a97d70ef
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ module Gitlab
# type - Singular Symbol reference type (e.g., :issue, :user, etc.)
# value - Object to add
def push_result(type, value)
return if value.nil?
result[:references][type].push(value)
end