mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Fixed issue when repeat object is malformed (#8765)
* Fixed issue when repeat object is malformed * Removed only * Changed numeric check to lodash isFinite * Removed newer lodash function
This commit is contained in:
committed by
Sabe Jones
parent
feae40cf0a
commit
6f034bb5dd
@@ -113,6 +113,7 @@ export function shouldDo (day, dailyTask, options = {}) {
|
||||
|
||||
if (dailyTask.repeat) {
|
||||
for (let [repeatDay, active] of Object.entries(dailyTask.repeat)) {
|
||||
if (!isFinite(DAY_MAPPING_STRING_TO_NUMBER[repeatDay])) continue; // eslint-disable-line no-continue
|
||||
if (active) daysOfTheWeek.push(parseInt(DAY_MAPPING_STRING_TO_NUMBER[repeatDay], 10));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user