Fix getStartDayOfWeek function

In case profile.startDayOfWeek is 0 it's evaluated to false and 1 is returned.
Let's fix this by differentiating between undefined and an actual value.

Fixes: 9ae20a3f51
This commit is contained in:
Marc Hartmayer 2020-04-28 20:50:55 +02:00
parent 3d5abd60cc
commit 153d729544

View file

@ -530,8 +530,11 @@ Users.helpers({
getStartDayOfWeek() {
const profile = this.profile || {};
// default is 'Monday' (1)
return profile.startDayOfWeek || 1;
if (typeof profile.startDayOfWeek === 'undefined') {
// default is 'Monday' (1)
return 1;
}
return profile.startDayOfWeek;
},
getTemplatesBoardId() {