1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix #1957 - WhatLanguage can return null. Fallback to 'en' (#1959)

This commit is contained in:
Eugen 2017-04-16 23:12:19 +02:00 committed by GitHub
parent 8f2ed79a0b
commit 8ebed7fc68

View file

@ -53,7 +53,7 @@ class PostStatusService < BaseService
end
def detect_language(text)
WhatLanguage.new(:all).language_iso(text)
WhatLanguage.new(:all).language_iso(text) || 'en'
end
def process_mentions_service