lib/mods_display/fields/language.rb in mods_display-1.0.0 vs lib/mods_display/fields/language.rb in mods_display-1.1.0
- old
+ new
@@ -9,10 +9,10 @@
value.languageTerm.map do |term|
next unless term.attributes['type'].respond_to?(:value) && term.attributes['type'].value == 'code'
ModsDisplay::Values.new(
label: displayLabel(value) || displayLabel(term) || I18n.t('mods_display.language'),
- values: [language_codes[term.text]]
+ values: [language_codes[element_text(term)]]
)
end.flatten.compact
end.flatten.compact
collapse_fields(return_fields)
end