Skip to content

Commit

Permalink
code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Sep 3, 2014
1 parent f79bb98 commit a19b2bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/registration/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ def self.hide_reg_codes(settings)

# create a duplicate
filtered = settings.dup
filtered["reg_code"] = FILTERED if filtered["reg_code"]
filtered["reg_code"] &&= FILTERED

return filtered unless filtered["addons"].is_a?(Array)
return filtered unless filtered["addons"]

# duplicate the nested values
filtered["addons"] = filtered["addons"].map(&:dup)

filtered["addons"].each do |addon|
addon["reg_code"] = FILTERED if addon["reg_code"]
addon["reg_code"] &&= FILTERED
end

filtered
Expand Down

0 comments on commit a19b2bf

Please sign in to comment.