Skip to content

Commit 4ccd8ef

Browse files
committed
fixing columns
1 parent c2d5afa commit 4ccd8ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/components/usage/actions/table-workflow-usage/table-workflow-usage.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class TableWorkflowUsageComponent implements OnChanges, AfterViewInit {
160160
item.avgCost = item.cost / item.runs;
161161
});
162162
usage = usageItems;
163-
this.columns = this.columns.sort((a, b) => (a.date?.getTime() || 0) - (b.date?.getTime() || 0));
163+
this.columns = this.columns.sort((a, b) => (!a.date || !b.date) ? 0 : a.date.getTime() - b.date.getTime());
164164
this.displayedColumns = this.columns.map(c => c.columnDef);
165165
this.dataSource.data = usage;
166166
}

0 commit comments

Comments
 (0)