mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Add false return when repeats are empty (#8777)
* Add false return when repeats are empty * Added front end check for repeats on monthly-daysOfWeek * Fixed tests with static date
This commit is contained in:
committed by
Sabe Jones
parent
c084f8a2b9
commit
f7ce269f3c
@@ -164,6 +164,7 @@ export function shouldDo (day, dailyTask, options = {}) {
|
||||
let matchEveryX = differenceInMonths % dailyTask.everyX === 0;
|
||||
|
||||
if (dailyTask.weeksOfMonth && dailyTask.weeksOfMonth.length > 0) {
|
||||
if (daysOfTheWeek.length === 0) return false;
|
||||
schedule = schedule.every(daysOfTheWeek).daysOfWeek()
|
||||
.every(dailyTask.weeksOfMonth).weeksOfMonthByDay();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user