From 9e214a332eeb7ddd7d6a7f61c6189b1aed1df0d1 Mon Sep 17 00:00:00 2001 From: Baptiste Toulemonde <toulemonde@cines.fr> Date: Fri, 7 Oct 2022 13:15:28 +0200 Subject: [PATCH] fix wip --- src/app/dataset/dataset.component.ts | 4 ++-- src/app/semantic-enrichment/semantic-enrichment.component.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/dataset/dataset.component.ts b/src/app/dataset/dataset.component.ts index b902f26ce..45ba51cc2 100644 --- a/src/app/dataset/dataset.component.ts +++ b/src/app/dataset/dataset.component.ts @@ -101,7 +101,7 @@ export class DatasetComponent implements OnInit { const concepts = new DataConcept(); concepts.url = this.dataset.url; concepts.iris = []; - this.dataset.keywords.forEach((value: ESModel, key: string) => { + 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) => { @@ -111,7 +111,7 @@ export class DatasetComponent implements OnInit { }); } } - }); + } 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})); } diff --git a/src/app/semantic-enrichment/semantic-enrichment.component.ts b/src/app/semantic-enrichment/semantic-enrichment.component.ts index 5db907993..91062ad3a 100644 --- a/src/app/semantic-enrichment/semantic-enrichment.component.ts +++ b/src/app/semantic-enrichment/semantic-enrichment.component.ts @@ -129,7 +129,8 @@ export class SemanticEnrichmentComponent implements OnInit { const concepts = new DataConcept(); concepts.id = data.id; concepts.iris = []; - data.keywords.forEach((value: ESModel, key: string) => { + + for (const [key, value] of data.keywords) { if (value && value.results) { value.results.forEach((result: Result) => { @@ -146,7 +147,7 @@ export class SemanticEnrichmentComponent implements OnInit { ); } mappingData.dataConcepts.push(concepts); - }); + } } }); -- GitLab