Skip to content

Commit

Permalink
fix hash
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Feb 24, 2024
1 parent e8f4504 commit 8bf9be1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ def parse_changeset(attribute, values, type, diff)
# Returns and Array of two Strings.
def parse_values(attribute, values)
values = [amended_previous_value(attribute), values[1]] if proposal&.emendation?
values = values.map { |item| item.to_h {|lang, value| [lang,normalize_line_endings(value)] }} if attribute == :body
if attribute == :body
values = values.map do |item|
if item.respond_to?(:to_h)
item.to_h {|lang, value| [lang,normalize_line_endings(value)] }
else
normalize_line_endings(item)
end
end
end
values
end

Expand Down

0 comments on commit 8bf9be1

Please sign in to comment.