summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorDavid Renshaw <david@sandstorm.io>2016-11-14 22:06:58 -0500
committerDavid Renshaw <david@sandstorm.io>2016-11-15 15:03:12 -0500
commit4b248151c3b1fbb763b5d95cd729fc99828be382 (patch)
tree6dc39805ba196390bda29836639824459d53d033 /client
parentf56c55e75c657d6348c4231779d410f4cdea7a04 (diff)
downloadwekan-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.js4
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;
}