Skip to content
Snippets Groups Projects
Commit c609b726 authored by Claire's avatar Claire
Browse files

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

parent 4d96d716
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment