Skip to content

Commit

Permalink
fixing columns
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Feb 6, 2024
1 parent c2d5afa commit 4ccd8ef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class TableWorkflowUsageComponent implements OnChanges, AfterViewInit {
item.avgCost = item.cost / item.runs;
});
usage = usageItems;
this.columns = this.columns.sort((a, b) => (a.date?.getTime() || 0) - (b.date?.getTime() || 0));
this.columns = this.columns.sort((a, b) => (!a.date || !b.date) ? 0 : a.date.getTime() - b.date.getTime());
this.displayedColumns = this.columns.map(c => c.columnDef);
this.dataSource.data = usage;
}
Expand Down

0 comments on commit 4ccd8ef

Please sign in to comment.