Fix error when processing link preview with an array as `inLanguage` (#28252)

th-downstream
Claire 11 months ago committed by GitHub
parent 336d6260ba
commit 7593465c23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,6 +37,7 @@ class LinkDetailsExtractor
def language
lang = json['inLanguage']
lang = lang.first if lang.is_a?(Array)
lang.is_a?(Hash) ? (lang['alternateName'] || lang['name']) : lang
end

Loading…
Cancel
Save