diff --git a/libs/portal-integration-angular/src/lib/services/export-data.service.ts b/libs/portal-integration-angular/src/lib/services/export-data.service.ts index 67ace8a6..b256f900 100644 --- a/libs/portal-integration-angular/src/lib/services/export-data.service.ts +++ b/libs/portal-integration-angular/src/lib/services/export-data.service.ts @@ -18,6 +18,9 @@ export class ExportDataService { data: Partial>[], fileName: string ): Promise { + if (!columns.length ) { + return + } const flattenedData = data.map((d) => columns.reduce((obj, c) => ({ ...obj, [c.id]: ObjectUtils.resolveFieldData(d, c.id) }), {}) )