Skip to content
Snippets Groups Projects
Commit 5894ee91 authored by François Grand's avatar François Grand
Browse files

fix: crash in SelectField.nub getter

refs #592
parent 3b748aec
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!199Resolve "Incohérence dans les fichiers de session"
......@@ -56,6 +56,10 @@ export abstract class FormulaireElement extends FormulaireNode {
*/
public get parentForm(): FormulaireDefinition {
let res = this.parent;
if (res === undefined) {
return undefined;
}
// while (!(res instanceof FormulaireDefinition))
while (!("calculatorName" in res)) {
// pour éviter de faire référence au type FormulaireDefinition, supprimer l'import correspondant et
......
......@@ -50,6 +50,10 @@ export abstract class SelectField extends Field {
* associated nub
*/
protected get nub(): Nub {
const parent = this.parentForm;
if (parent === undefined) {
return undefined;
}
return (this.parentForm as FormulaireDefinition).currentNub;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment