mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
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:
parent
3d5abd60cc
commit
153d729544
1 changed files with 5 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue