diff --git a/src/nub.ts b/src/nub.ts
index b090c1bec32101cf0d1018478de470e584da2ea8..efef15d7a301711660a7bca3b92153a0ca7efae5 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;