diff --git a/src/app/dataset/dataset.component.html b/src/app/dataset/dataset.component.html index 9db87816fc6857a8358e693693e0ff989ad792b8..01849f3c6c37cdeb8914e274996add4077763e2c 100644 --- a/src/app/dataset/dataset.component.html +++ b/src/app/dataset/dataset.component.html @@ -39,11 +39,11 @@ </nb-card-header> <nb-list> <nb-list-item *ngFor="let k of dataset.conceptIri"> - <span><button nbButton ghost> + <!--<span><button nbButton ghost> <nb-icon icon="trash-2-outline" status="danger" (click)="deleteExistingConcepts(i)"> </nb-icon> - </button></span> {{ k }} + </button></span>--> {{ k }} </nb-list-item> </nb-list> </nb-card> diff --git a/src/app/dataset/dataset.component.ts b/src/app/dataset/dataset.component.ts index 45ba51cc287aa137a77858ac75a84b43cf5f72a2..7c064b27f169d501c4ec80a8da61b55eaf667380 100644 --- a/src/app/dataset/dataset.component.ts +++ b/src/app/dataset/dataset.component.ts @@ -101,17 +101,20 @@ export class DatasetComponent implements OnInit { const concepts = new DataConcept(); concepts.url = this.dataset.url; concepts.iris = []; - for (const [key, value] of this.dataset.keywords) { - if ((null !== value && value.results.filter(e => e.checked).length > 0)) { - if (value) { - value.results.forEach((result: Result) => { - if (result.checked) { - concepts.iris.push({iri: result.source.document.iri, label: result.source.document.label, originalKeyword: key}); - } - }); + if (this.dataset.keywords && this.dataset.keywords.size > 0) { + for (const [key, value] of this.dataset.keywords) { + if ((null !== value && value.results.filter(e => e.checked).length > 0)) { + if (value) { + value.results.forEach((result: Result) => { + if (result.checked) { + concepts.iris.push({iri: result.source.document.iri, label: result.source.document.label, originalKeyword: key}); + } + }); + } } } } + if (this.autocompleteResults && this.autocompleteResults.length > 0) { this.autocompleteResults.forEach((result: Result) => concepts.iris.push({iri: result.source.document.iri, label: result.source.document.label, originalKeyword: null})); }