mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 21:32:44 +01:00
Fix error when processing link preview with an array as inLanguage
(#28252)
This commit is contained in:
parent
4d96d716c4
commit
c609b726cb
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue