diff options
author | Corey Hulen <corey@hulen.com> | 2017-07-03 10:26:30 -0700 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-07-03 13:26:30 -0400 |
commit | e60c6dec19e7c1c98ca0cb588d485ba46e136505 (patch) | |
tree | c3e6400a84d443e4b2f3f843d7631663199ed3a2 /webapp | |
parent | 171a788715c8d363dd72706aead89e985617ef90 (diff) | |
download | chat-e60c6dec19e7c1c98ca0cb588d485ba46e136505.tar.gz chat-e60c6dec19e7c1c98ca0cb588d485ba46e136505.tar.bz2 chat-e60c6dec19e7c1c98ca0cb588d485ba46e136505.zip |
PLT-6935 Fixes issue when locale set to unknown (#6829)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/actions/global_actions.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx index 1108e3834..2ab2692c0 100644 --- a/webapp/actions/global_actions.jsx +++ b/webapp/actions/global_actions.jsx @@ -356,15 +356,15 @@ export function sendEphemeralPost(message, channelId) { } export function newLocalizationSelected(locale) { - if (locale === 'en') { + const localeInfo = I18n.getLanguageInfo(locale); + + if (locale === 'en' || !localeInfo) { AppDispatcher.handleServerAction({ type: ActionTypes.RECEIVED_LOCALE, locale, translations: en }); } else { - const localeInfo = I18n.getLanguageInfo(locale); - Client4.getTranslations(localeInfo.url).then( (data, res) => { let translations = data; |