Skip to content

Commit

Permalink
Merge pull request #39 from Informatievlaanderen/SDTT-267-Converter-p…
Browse files Browse the repository at this point in the history
…rocessing-all-connectors-results-in-error

Fix connector normalisation function
  • Loading branch information
ddvlanck authored Feb 8, 2024
2 parents d05b57f + 5977841 commit 9128d4f
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ export class ConnectorConverterHandler extends ConverterHandler<NormalizedConnec
}

public async normalize(model: DataRegistry): Promise<DataRegistry> {
const tasks: Promise<NormalizedConnector[]>[] = [];
model.connectors.forEach(connector => {
tasks.push(
this.connectorNormalisationService.normalise(connector, model),
);
});
const tasks: Promise<NormalizedConnector[]>[] = model.connectors
.filter(x => model.targetDiagram.connectorsIds.includes(x.id))
.map(connector => this.connectorNormalisationService.normalise(connector, model));

model.normalizedConnectors = await Promise.all(tasks).then(x => x.flat());

Expand Down

0 comments on commit 9128d4f

Please sign in to comment.