diff options
author | David Renshaw <david@sandstorm.io> | 2016-11-14 22:06:58 -0500 |
---|---|---|
committer | David Renshaw <david@sandstorm.io> | 2016-11-15 15:03:12 -0500 |
commit | 4b248151c3b1fbb763b5d95cd729fc99828be382 (patch) | |
tree | 6dc39805ba196390bda29836639824459d53d033 /client | |
parent | f56c55e75c657d6348c4231779d410f4cdea7a04 (diff) | |
download | wekan-4b248151c3b1fbb763b5d95cd729fc99828be382.tar.gz wekan-4b248151c3b1fbb763b5d95cd729fc99828be382.tar.bz2 wekan-4b248151c3b1fbb763b5d95cd729fc99828be382.zip |
always fall back to navigator.language if user.profile.language is not set
Diffstat (limited to 'client')
-rw-r--r-- | client/lib/i18n.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/lib/i18n.js b/client/lib/i18n.js index f2709d15..34a789e1 100644 --- a/client/lib/i18n.js +++ b/client/lib/i18n.js @@ -6,8 +6,8 @@ Meteor.startup(() => { Tracker.autorun(() => { const currentUser = Meteor.user(); let language; - if (currentUser) { - language = currentUser.profile && currentUser.profile.language; + if (currentUser && currentUser.profile && currentUser.profile.language) { + language = currentUser.profile.language; } else { language = navigator.language || navigator.userLanguage; } |