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

lolsob-rspec
Eugen 2017-04-16 23:12:19 +02:00 committed by GitHub
parent e7f68ee031
commit 6e801f4030
1 changed files with 1 additions and 1 deletions

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