From d637def7a161bbcab2d68990183e39816ba04331 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 15 Nov 2024 20:45:21 +0300 Subject: [PATCH] M: Broaden substitution suggestions Allow constituents with no links to other constituents --- rsconcept/frontend/src/models/ossAPI.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsconcept/frontend/src/models/ossAPI.ts b/rsconcept/frontend/src/models/ossAPI.ts index d2b4b826..7559b084 100644 --- a/rsconcept/frontend/src/models/ossAPI.ts +++ b/rsconcept/frontend/src/models/ossAPI.ts @@ -125,11 +125,11 @@ export class SubstitutionValidator { if (this.originals.has(cst.id)) { continue; } - if (cst.cst_class === CstClass.BASIC) { + if (cst.cst_class === CstClass.BASIC || cst.definition_formal.length === 0) { continue; } const inputs = schema.graph.at(cst.id)!.inputs; - if (inputs.length === 0 || inputs.some(id => !this.constituents.has(id))) { + if (inputs.some(id => !this.constituents.has(id))) { continue; } if (inputs.some(id => this.originals.has(id))) {