mirror of
https://github.com/wekan/wekan.git
synced 2025-12-19 17:00:13 +01: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() {
|
getStartDayOfWeek() {
|
||||||
const profile = this.profile || {};
|
const profile = this.profile || {};
|
||||||
|
if (typeof profile.startDayOfWeek === 'undefined') {
|
||||||
// default is 'Monday' (1)
|
// default is 'Monday' (1)
|
||||||
return profile.startDayOfWeek || 1;
|
return 1;
|
||||||
|
}
|
||||||
|
return profile.startDayOfWeek;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTemplatesBoardId() {
|
getTemplatesBoardId() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue