gantt-task-react-powern 0.6.26 → 0.6.27

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/index.js CHANGED
@@ -4653,25 +4653,27 @@ function computeCriticalPath(taskID, taskMap) {
4653
4653
  var endWeek = Math.floor((depEnd / 86400000 + 4) / 7);
4654
4654
  var offTime = 0;
4655
4655
 
4656
- if (taskMap[dependents[j]].task.calendar.off_days && taskMap[dependents[j]].task.calendar.off_days.length) {
4657
- for (var d = 0; d < taskMap[dependents[j]].task.calendar.off_days.length || 0; d++) {
4658
- for (var w = startWeek; w <= endWeek; w++) {
4659
- var dayOfTheWeek = taskMap[dependents[j]].task.calendar.off_days[d];
4660
- var offDay = 86400000 * (7 * w - 4 + dayOfTheWeek);
4661
-
4662
- if (offDay >= depStart && offDay <= depEnd && (offDay > taskMap[taskID].end || taskMap[taskID].task.calendar.off_days.includes(dayOfTheWeek))) {
4663
- offTime += 86400000;
4656
+ if (taskMap[dependents[j]].task.calendar) {
4657
+ if (taskMap[dependents[j]].task.calendar.off_days && taskMap[dependents[j]].task.calendar.off_days.length) {
4658
+ for (var d = 0; d < taskMap[dependents[j]].task.calendar.off_days.length || 0; d++) {
4659
+ for (var w = startWeek; w <= endWeek; w++) {
4660
+ var dayOfTheWeek = taskMap[dependents[j]].task.calendar.off_days[d];
4661
+ var offDay = 86400000 * (7 * w - 4 + dayOfTheWeek);
4662
+
4663
+ if (offDay >= depStart && offDay <= depEnd && (offDay > taskMap[taskID].end || taskMap[taskID].task.calendar.off_days.includes(dayOfTheWeek))) {
4664
+ offTime += 86400000;
4665
+ }
4664
4666
  }
4665
4667
  }
4666
4668
  }
4667
- }
4668
4669
 
4669
- if (taskMap[dependents[j]].task.calendar.holidays && taskMap[dependents[j]].task.calendar.holidays.length) {
4670
- for (var h = 0; h < taskMap[dependents[j]].task.calendar.holidays.length || 0; h++) {
4671
- var holiday = taskMap[dependents[j]].task.calendar.holidays[h];
4670
+ if (taskMap[dependents[j]].task.calendar.holidays && taskMap[dependents[j]].task.calendar.holidays.length) {
4671
+ for (var h = 0; h < taskMap[dependents[j]].task.calendar.holidays.length || 0; h++) {
4672
+ var holiday = taskMap[dependents[j]].task.calendar.holidays[h];
4672
4673
 
4673
- if (holiday >= depStart && holiday <= depEnd) {
4674
- offTime += 86400000;
4674
+ if (holiday >= depStart && holiday <= depEnd) {
4675
+ offTime += 86400000;
4676
+ }
4675
4677
  }
4676
4678
  }
4677
4679
  }