mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
B: Fix error with loading RSForm
This commit is contained in:
parent
8ad1db5295
commit
79f6d4cdb1
|
@ -72,7 +72,8 @@ export class RSFormLoader {
|
||||||
});
|
});
|
||||||
const inherit_children = new Set(this.schema.inheritance.map(item => item.child));
|
const inherit_children = new Set(this.schema.inheritance.map(item => item.child));
|
||||||
const inherit_parents = new Set(this.schema.inheritance.map(item => item.parent));
|
const inherit_parents = new Set(this.schema.inheritance.map(item => item.parent));
|
||||||
this.graph.topologicalOrder().forEach(cstID => {
|
const order = this.graph.topologicalOrder();
|
||||||
|
order.forEach(cstID => {
|
||||||
const cst = this.cstByID.get(cstID)!;
|
const cst = this.cstByID.get(cstID)!;
|
||||||
cst.status = inferStatus(cst.parse.status, cst.parse.valueClass);
|
cst.status = inferStatus(cst.parse.status, cst.parse.valueClass);
|
||||||
cst.is_template = inferTemplate(cst.definition_formal);
|
cst.is_template = inferTemplate(cst.definition_formal);
|
||||||
|
@ -84,10 +85,12 @@ export class RSFormLoader {
|
||||||
cst.is_inherited = inherit_children.has(cst.id);
|
cst.is_inherited = inherit_children.has(cst.id);
|
||||||
cst.has_inherited_children = inherit_parents.has(cst.id);
|
cst.has_inherited_children = inherit_parents.has(cst.id);
|
||||||
cst.is_simple_expression = this.inferSimpleExpression(cst);
|
cst.is_simple_expression = this.inferSimpleExpression(cst);
|
||||||
if (!cst.is_simple_expression || cst.cst_type === CstType.STRUCTURED) {
|
if (cst.is_simple_expression && cst.cst_type !== CstType.STRUCTURED) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
cst.spawner = this.inferParent(cst);
|
cst.spawner = this.inferParent(cst);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
order.forEach(cstID => {
|
||||||
|
const cst = this.cstByID.get(cstID)!;
|
||||||
if (cst.spawner) {
|
if (cst.spawner) {
|
||||||
const parent = this.cstByID.get(cst.spawner)!;
|
const parent = this.cstByID.get(cst.spawner)!;
|
||||||
cst.spawner_alias = parent.alias;
|
cst.spawner_alias = parent.alias;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user