fix(task): make sure daysOfMonth update is only applied to dailies

This commit is contained in:
Matteo Pagliazzi
2020-08-10 19:08:36 +02:00
parent 747c4ffbad
commit 535aa860f1
2 changed files with 11 additions and 6 deletions

View File

@@ -363,9 +363,9 @@ export const DailySchema = new Schema(_.defaults({
},
streak: { $type: Number, default: 0 },
// Days of the month that the daily should repeat on
daysOfMonth: { $type: [Number], default: [] },
daysOfMonth: { $type: [Number], default: () => [] },
// Weeks of the month that the daily should repeat on
weeksOfMonth: { $type: [Number], default: [] },
weeksOfMonth: { $type: [Number], default: () => [] },
isDue: { $type: Boolean },
nextDue: [{ $type: String }],
yesterDaily: { $type: Boolean, default: true, required: true },