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

signup-info-prompt
Eugen 2017-04-16 23:12:19 +02:00 committed by GitHub
parent 8f2ed79a0b
commit 8ebed7fc68
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