Fix day header inserted into break
If a span ended on midnight the next day header would be started on the break and the sameDay check would match the day of the next span causing the day header to be inserted into the break column. Fix by checking that the last day header has a non-zero span in the same day check.
This commit is contained in:
parent
3da83a7feb
commit
5044b7b58d
1 changed files with 2 additions and 1 deletions
|
@ -330,7 +330,8 @@ function tableElementsFromStretches(
|
|||
} else {
|
||||
startColumnGroup("break");
|
||||
const dayName = stretch.start.slice(0, 10)
|
||||
const sameDay = dayName === dayHeaders[dayHeaders.length - 1].content;
|
||||
const lastDayHeader = dayHeaders[dayHeaders.length - 1]
|
||||
const sameDay = dayName === lastDayHeader.content && lastDayHeader.span;
|
||||
if (!sameDay)
|
||||
startDay();
|
||||
startHour("break");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue