diff --git a/src/app/_helpers/export-csv.ts b/src/app/_helpers/export-csv.ts index 6962ae0..7100842 100644 --- a/src/app/_helpers/export-csv.ts +++ b/src/app/_helpers/export-csv.ts @@ -1,5 +1,5 @@ function exportCsv(arrayData: any[], filename: string, delimiter = ','): void { - if (arrayData === undefined) { return; } + if (arrayData === undefined || arrayData.length === 0) { return; } const header = Object.keys(arrayData[0]).join(delimiter) + '\n'; let csv = header; arrayData.forEach(obj => { diff --git a/src/app/_interceptors/error.interceptor.ts b/src/app/_interceptors/error.interceptor.ts index 1aef324..96c404f 100644 --- a/src/app/_interceptors/error.interceptor.ts +++ b/src/app/_interceptors/error.interceptor.ts @@ -1,4 +1,4 @@ -import {Injectable, isDevMode} from '@angular/core'; +import {Injectable} from '@angular/core'; import { HttpRequest, HttpHandler,