From 7930e1f4d68de2e31386b348527e4a0cbe1eddb0 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Mon, 25 Mar 2019 10:49:45 +0100 Subject: [PATCH] Fix bug in linked parameters loop detection --- src/nub.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/nub.ts b/src/nub.ts index b090c1be..efef15d7 100644 --- a/src/nub.ts +++ b/src/nub.ts @@ -284,13 +284,16 @@ export abstract class Nub extends ComputeNode { } thisFamily = thisFamily.concat(this.getChildren()); + let yourFamily: Nub[] = []; const you = Session.getInstance().findNubByUid(uid); - let yourFamily: Nub[] = [you]; - const yp = you.getParent(); - if (yp) { - yourFamily = yourFamily.concat(yp); + if (you) { + yourFamily = [you]; + const yp = you.getParent(); + if (yp) { + yourFamily = yourFamily.concat(yp); + } + yourFamily = yourFamily.concat(you.getChildren()); } - yourFamily = yourFamily.concat(you.getChildren()); let depends = false; -- GitLab