From c1bae8c80fbe13ee6ccff4689a0d2cfc337a6a1e Mon Sep 17 00:00:00 2001 From: chrisvpeters Date: Wed, 19 Jun 2024 16:11:34 +1000 Subject: [PATCH] AUS-4203 --- .../modalwindow/querier/querier.modal.component.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/modalwindow/querier/querier.modal.component.ts b/src/app/modalwindow/querier/querier.modal.component.ts index bffb5d39..b4852ab2 100644 --- a/src/app/modalwindow/querier/querier.modal.component.ts +++ b/src/app/modalwindow/querier/querier.modal.component.ts @@ -297,7 +297,7 @@ export class QuerierModalComponent implements OnInit, AfterViewInit { public getNVCL() { if (!this.imScDoButtonsEnabled) { return; } - + // check if have already loaded if (this.loadedDataset.includes(this.currentDoc.key)) { this.nvclIndex = this.loadedDataset.indexOf(this.currentDoc.key); @@ -405,15 +405,20 @@ export class QuerierModalComponent implements OnInit, AfterViewInit { const logs = this.datasetScalars[datasetId]; const logIds = []; - for (const log of logs) { - if (log.value) { - logIds.push(log.logId); + + if (this.isIterable(logs)) { + for (const log of logs) { + if (log.value) { + logIds.push(log.logId); + } } } if (logIds.length <= 0) { alert('No logs selected'); + return; } + this.nvclService.getNVCL2_0_CSVDownload(this.currentDoc.onlineResource.url, logIds). subscribe(response => { const blob = new Blob([response], { type: 'application/csv' });