diff --git a/src/components/TimesheetTable/TimesheetTable.ts b/src/components/TimesheetTable/TimesheetTable.ts index aa746a3..8fb7bc7 100644 --- a/src/components/TimesheetTable/TimesheetTable.ts +++ b/src/components/TimesheetTable/TimesheetTable.ts @@ -132,6 +132,10 @@ export class TimesheetTable extends DomComponent { depth: 0, })); + // Need to reverse the order of the initial stack so that it's iterated in + // the correct order + stack.reverse(); + while (stack.length > 0) { const { entry, depth } = stack.pop()!;