ingeniuscliq-core 0.5.17 → 0.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/schedule.js +2 -2
- package/package.json +1 -1
package/dist/helpers/schedule.js
CHANGED
|
@@ -13,7 +13,7 @@ const groupConsecutiveDays = (schedule) => {
|
|
|
13
13
|
const groups = [];
|
|
14
14
|
DAYS_ORDER.forEach((day, index) => {
|
|
15
15
|
const daySchedule = schedule[day];
|
|
16
|
-
if (!daySchedule.enabled) return;
|
|
16
|
+
if (!daySchedule || !daySchedule.enabled) return;
|
|
17
17
|
const lastGroup = groups[groups.length - 1];
|
|
18
18
|
if (lastGroup && isSameSchedule(lastGroup.schedule, daySchedule)) {
|
|
19
19
|
const lastDayInGroup = lastGroup.days[lastGroup.days.length - 1];
|
|
@@ -21,7 +21,7 @@ const groupConsecutiveDays = (schedule) => {
|
|
|
21
21
|
let isConsecutive = true;
|
|
22
22
|
for (let i = lastDayIndex + 1; i < index; i++) {
|
|
23
23
|
const intermediateDaySchedule = schedule[DAYS_ORDER[i]];
|
|
24
|
-
if (!intermediateDaySchedule.enabled || !isSameSchedule(daySchedule, intermediateDaySchedule)) {
|
|
24
|
+
if (!intermediateDaySchedule || !intermediateDaySchedule.enabled || !isSameSchedule(daySchedule, intermediateDaySchedule)) {
|
|
25
25
|
isConsecutive = false;
|
|
26
26
|
break;
|
|
27
27
|
}
|