1
0
Fork 1
forked from fedi/mastodon

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 end
def detect_language(text) def detect_language(text)
WhatLanguage.new(:all).language_iso(text) WhatLanguage.new(:all).language_iso(text) || 'en'
end end
def process_mentions_service def process_mentions_service