mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-12 23:38:20 +00:00
Fix error when processing link preview with an array as inLanguage (#28252)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user