fix: if isExcludedWeeks or weeks is null then pass condition
This commit is contained in:
parent
49179d2a8a
commit
fc828f3008
@ -73,9 +73,12 @@ export class TableComponent implements OnChanges {
|
||||
x.dayOfWeek === k &&
|
||||
x.isEven === (this.currentWeek % 2 === 0) &&
|
||||
(
|
||||
(x.isExcludedWeeks && (!x.weeks || !x.weeks.includes(this.currentWeek))) ||
|
||||
(!x.isExcludedWeeks && (!x.weeks || x.weeks.includes(this.currentWeek)))
|
||||
));
|
||||
x.isExcludedWeeks === undefined ||
|
||||
x.weeks === undefined ||
|
||||
(x.isExcludedWeeks && (!x.weeks.includes(this.currentWeek))) ||
|
||||
(!x.isExcludedWeeks && (x.weeks.includes(this.currentWeek)))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
tableData.push(convertedData);
|
||||
|
Loading…
Reference in New Issue
Block a user