mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
cron: fix repeat, for old users without default task.repeat={}
This commit is contained in:
parent
92b178b4a4
commit
0a0cf1d94e
1 changed files with 1 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ daysBetween = (yesterday, now, dayStart) -> Math.abs sod(yesterday, dayStart).di
|
|||
dayMapping = {0:'su',1:'m',2:'t',3:'w',4:'th',5:'f',6:'s'}
|
||||
|
||||
shouldDo = (day, repeat, dayStart=0) ->
|
||||
return false unless repeat
|
||||
now = +new Date
|
||||
selected = repeat[dayMapping[sod(day, dayStart).day()]]
|
||||
if moment(day).isSame(now,'d')
|
||||
|
|
|
|||
Loading…
Reference in a new issue